Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: base/trace_event/trace_event.h

Issue 2929673005: Code cleanup and typos in trace_event [NFC] (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/trace_event/trace_category_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_H_ 5 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_H_
6 #define BASE_TRACE_EVENT_TRACE_EVENT_H_ 6 #define BASE_TRACE_EVENT_TRACE_EVENT_H_
7 7
8 // This header file defines implementation details of how the trace macros in 8 // This header file defines implementation details of how the trace macros in
9 // trace_event_common.h collect and store trace events. Anything not 9 // trace_event_common.h collect and store trace events. Anything not
10 // implementation-specific should go in trace_event_common.h instead of here. 10 // implementation-specific should go in trace_event_common.h instead of here.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 trace_event_internal::TraceID::DontMangle(id) 43 trace_event_internal::TraceID::DontMangle(id)
44 44
45 // By default, trace IDs are eventually converted to a single 64-bit number. Use 45 // By default, trace IDs are eventually converted to a single 64-bit number. Use
46 // this macro to add a scope string. For example, 46 // this macro to add a scope string. For example,
47 // 47 //
48 // TRACE_EVENT_NESTABLE_ASYNC_BEGIN0( 48 // TRACE_EVENT_NESTABLE_ASYNC_BEGIN0(
49 // "network", "ResourceLoad", 49 // "network", "ResourceLoad",
50 // TRACE_ID_WITH_SCOPE("BlinkResourceID", resourceID)); 50 // TRACE_ID_WITH_SCOPE("BlinkResourceID", resourceID));
51 // 51 //
52 // Also, it is possible to prepend the ID with another number, like the process 52 // Also, it is possible to prepend the ID with another number, like the process
53 // ID. This is useful in creatin IDs that are unique among all processes. To do 53 // ID. This is useful in creating IDs that are unique among all processes. To do
54 // that, pass two numbers after the scope string instead of one. For example, 54 // that, pass two numbers after the scope string instead of one. For example,
55 // 55 //
56 // TRACE_EVENT_NESTABLE_ASYNC_BEGIN0( 56 // TRACE_EVENT_NESTABLE_ASYNC_BEGIN0(
57 // "network", "ResourceLoad", 57 // "network", "ResourceLoad",
58 // TRACE_ID_WITH_SCOPE("BlinkResourceID", pid, resourceID)); 58 // TRACE_ID_WITH_SCOPE("BlinkResourceID", pid, resourceID));
59 #define TRACE_ID_WITH_SCOPE(scope, ...) \ 59 #define TRACE_ID_WITH_SCOPE(scope, ...) \
60 trace_event_internal::TraceID::WithScope(scope, ##__VA_ARGS__) 60 trace_event_internal::TraceID::WithScope(scope, ##__VA_ARGS__)
61 61
62 #define TRACE_ID_GLOBAL(id) trace_event_internal::TraceID::GlobalId(id) 62 #define TRACE_ID_GLOBAL(id) trace_event_internal::TraceID::GlobalId(id)
63 #define TRACE_ID_LOCAL(id) trace_event_internal::TraceID::LocalId(id) 63 #define TRACE_ID_LOCAL(id) trace_event_internal::TraceID::LocalId(id)
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 const char* name_; 1109 const char* name_;
1110 IDType id_; 1110 IDType id_;
1111 1111
1112 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); 1112 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject);
1113 }; 1113 };
1114 1114
1115 } // namespace trace_event 1115 } // namespace trace_event
1116 } // namespace base 1116 } // namespace base
1117 1117
1118 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ 1118 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_
OLDNEW
« no previous file with comments | « base/trace_event/trace_category_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698