commit | 3b14e6554b07defdad00c17d162c6e7121f71fbf | [log] [tgz] |
---|---|---|
author | skyostil <skyostil@chromium.org> | Fri Jan 22 16:04:24 2016 |
committer | Commit bot <commit-bot@chromium.org> | Fri Jan 22 16:06:28 2016 |
tree | 87884a421e9e30e3f76d23356af6d053e3186186 | |
parent | 1bd40d2ce1343f69a9a80ce99a7de058d376471b [diff] |
tracing: Add macros for generating context trace events These macros can be used to annotate sections of code that are working on specific trace contexts. For example, to mark a piece of code as belonging to a particular HTML frame: TRACE_EVENT_ENTER_CONTEXT("blink", "FrameContext", &my_frame); // Do something with |my_frame|. TRACE_EVENT_LEAVE_CONTEXT("blink", "FrameContext", &my_frame); The patch also adds a scoped helper: TraceScopedContext scoped_context("blink", "FrameContext", &my_frame); For more details see the design doc: https://docs.google.com/document/d/15BB-suCb9j-nFt55yCFJBJCGzLg2qUm3WaSOPb8APtI/edit?pli=1#heading=h.4lvgp19u6rwx BUG=546021 Review URL: https://codereview.chromium.org/1499683002 Cr-Original-Commit-Position: refs/heads/master@{#370976} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 29ffcdce7014502105f8d95a97259c910ba3b8be