OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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. |
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 #define TRACE_EVENT_PHASE_SAMPLE ('P') | 921 #define TRACE_EVENT_PHASE_SAMPLE ('P') |
922 #define TRACE_EVENT_PHASE_CREATE_OBJECT ('N') | 922 #define TRACE_EVENT_PHASE_CREATE_OBJECT ('N') |
923 #define TRACE_EVENT_PHASE_SNAPSHOT_OBJECT ('O') | 923 #define TRACE_EVENT_PHASE_SNAPSHOT_OBJECT ('O') |
924 #define TRACE_EVENT_PHASE_DELETE_OBJECT ('D') | 924 #define TRACE_EVENT_PHASE_DELETE_OBJECT ('D') |
925 | 925 |
926 // Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT. | 926 // Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT. |
927 #define TRACE_EVENT_FLAG_NONE (static_cast<unsigned char>(0)) | 927 #define TRACE_EVENT_FLAG_NONE (static_cast<unsigned char>(0)) |
928 #define TRACE_EVENT_FLAG_COPY (static_cast<unsigned char>(1 << 0)) | 928 #define TRACE_EVENT_FLAG_COPY (static_cast<unsigned char>(1 << 0)) |
929 #define TRACE_EVENT_FLAG_HAS_ID (static_cast<unsigned char>(1 << 1)) | 929 #define TRACE_EVENT_FLAG_HAS_ID (static_cast<unsigned char>(1 << 1)) |
930 #define TRACE_EVENT_FLAG_MANGLE_ID (static_cast<unsigned char>(1 << 2)) | 930 #define TRACE_EVENT_FLAG_MANGLE_ID (static_cast<unsigned char>(1 << 2)) |
931 #define TRACE_EVENT_FLAG_SCOPE_OFFSET (static_cast<unsigned char>(1 << 3)) | 931 #define TRACE_EVENT_FLAG_CONTINUOUS_SAMPLING \ |
| 932 (static_cast<unsigned char>(1 << 3)) |
| 933 #define TRACE_EVENT_FLAG_SCOPE_OFFSET (static_cast<unsigned char>(1 << 4)) |
932 | 934 |
933 #define TRACE_EVENT_FLAG_SCOPE_MASK (static_cast<unsigned char>( \ | 935 #define TRACE_EVENT_FLAG_SCOPE_MASK (static_cast<unsigned char>( \ |
934 TRACE_EVENT_FLAG_SCOPE_OFFSET | (TRACE_EVENT_FLAG_SCOPE_OFFSET << 1))) | 936 TRACE_EVENT_FLAG_SCOPE_OFFSET | (TRACE_EVENT_FLAG_SCOPE_OFFSET << 1))) |
935 | 937 |
936 // Type values for identifying types in the TraceValue union. | 938 // Type values for identifying types in the TraceValue union. |
937 #define TRACE_VALUE_TYPE_BOOL (static_cast<unsigned char>(1)) | 939 #define TRACE_VALUE_TYPE_BOOL (static_cast<unsigned char>(1)) |
938 #define TRACE_VALUE_TYPE_UINT (static_cast<unsigned char>(2)) | 940 #define TRACE_VALUE_TYPE_UINT (static_cast<unsigned char>(2)) |
939 #define TRACE_VALUE_TYPE_INT (static_cast<unsigned char>(3)) | 941 #define TRACE_VALUE_TYPE_INT (static_cast<unsigned char>(3)) |
940 #define TRACE_VALUE_TYPE_DOUBLE (static_cast<unsigned char>(4)) | 942 #define TRACE_VALUE_TYPE_DOUBLE (static_cast<unsigned char>(4)) |
941 #define TRACE_VALUE_TYPE_POINTER (static_cast<unsigned char>(5)) | 943 #define TRACE_VALUE_TYPE_POINTER (static_cast<unsigned char>(5)) |
942 #define TRACE_VALUE_TYPE_STRING (static_cast<unsigned char>(6)) | 944 #define TRACE_VALUE_TYPE_STRING (static_cast<unsigned char>(6)) |
943 #define TRACE_VALUE_TYPE_COPY_STRING (static_cast<unsigned char>(7)) | 945 #define TRACE_VALUE_TYPE_COPY_STRING (static_cast<unsigned char>(7)) |
944 #define TRACE_VALUE_TYPE_CONVERTABLE (static_cast<unsigned char>(8)) | 946 #define TRACE_VALUE_TYPE_CONVERTABLE (static_cast<unsigned char>(8)) |
945 | 947 |
946 // Enum reflecting the scope of an INSTANT event. Must fit within | 948 // Enum reflecting the scope of an INSTANT event. Must fit within |
947 // TRACE_EVENT_FLAG_SCOPE_MASK. | 949 // TRACE_EVENT_FLAG_SCOPE_MASK. |
948 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) | 950 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 4)) |
949 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) | 951 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 4)) |
950 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) | 952 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 4)) |
951 | 953 |
952 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') | 954 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') |
953 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') | 955 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') |
954 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') | 956 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') |
955 | 957 |
956 namespace trace_event_internal { | 958 namespace trace_event_internal { |
957 | 959 |
958 // Specify these values when the corresponding argument of AddTraceEvent is not | 960 // Specify these values when the corresponding argument of AddTraceEvent is not |
959 // used. | 961 // used. |
960 const int kZeroNumArgs = 0; | 962 const int kZeroNumArgs = 0; |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1541 const char* name_; | 1543 const char* name_; |
1542 IDType id_; | 1544 IDType id_; |
1543 | 1545 |
1544 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); | 1546 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); |
1545 }; | 1547 }; |
1546 | 1548 |
1547 } // namespace debug | 1549 } // namespace debug |
1548 } // namespace base | 1550 } // namespace base |
1549 | 1551 |
1550 #endif /* BASE_DEBUG_TRACE_EVENT_H_ */ | 1552 #endif /* BASE_DEBUG_TRACE_EVENT_H_ */ |
OLD | NEW |