Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This header file defines the set of trace_event macros without specifying | 5 // This header file defines the set of trace_event macros without specifying |
| 6 // how the events actually get collected and stored. If you need to expose trace | 6 // how the events actually get collected and stored. If you need to expose trace |
| 7 // events to some other universe, you can copy-and-paste this file as well as | 7 // events to some other universe, you can copy-and-paste this file as well as |
| 8 // trace_event.h, modifying the macros contained there as necessary for the | 8 // trace_event.h, modifying the macros contained there as necessary for the |
| 9 // target platform. The end result is that multiple libraries can funnel events | 9 // target platform. The end result is that multiple libraries can funnel events |
| 10 // through to a shared trace event collector. | 10 // through to a shared trace event collector. |
| 11 | 11 |
| 12 // IMPORTANT: To avoid conflicts, if you need to modify this file for a library, | 12 // IMPORTANT: To avoid conflicts, if you need to modify this file for a library, |
|
haraken
2016/09/16 07:51:32
Ditto. We should unify the tracing macros with Chr
| |
| 13 // land your change in base/ first, and then copy-and-paste it. | 13 // land your change in base/ first, and then copy-and-paste it. |
| 14 | 14 |
| 15 // Trace events are for tracking application performance and resource usage. | 15 // Trace events are for tracking application performance and resource usage. |
| 16 // Macros are provided to track: | 16 // Macros are provided to track: |
| 17 // Begin and end of function calls | 17 // Begin and end of function calls |
| 18 // Counters | 18 // Counters |
| 19 // | 19 // |
| 20 // Events are issued against categories. Whereas LOG's | 20 // Events are issued against categories. Whereas LOG's |
| 21 // categories are statically defined, TRACE categories are created | 21 // categories are statically defined, TRACE categories are created |
| 22 // implicitly with a string. For example: | 22 // implicitly with a string. For example: |
| (...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1041 | 1041 |
| 1042 // Enum reflecting the scope of an INSTANT event. Must fit within | 1042 // Enum reflecting the scope of an INSTANT event. Must fit within |
| 1043 // TRACE_EVENT_FLAG_SCOPE_MASK. | 1043 // TRACE_EVENT_FLAG_SCOPE_MASK. |
| 1044 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) | 1044 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) |
| 1045 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) | 1045 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) |
| 1046 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) | 1046 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) |
| 1047 | 1047 |
| 1048 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') | 1048 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') |
| 1049 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') | 1049 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') |
| 1050 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') | 1050 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') |
| OLD | NEW |