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

Unified Diff: base/trace_event/common/trace_event_common.h

Issue 2040663002: Tracing: Added necessary plumbing to make sure clocksync metadata events are always included. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/trace_event/memory_dump_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/common/trace_event_common.h
diff --git a/base/trace_event/common/trace_event_common.h b/base/trace_event/common/trace_event_common.h
index 0a04d627108c773755c5bdebf4fb897afc8d392f..eb0fbae8af6585c0c15ba5fbfc3d30fdfbb086b0 100644
--- a/base/trace_event/common/trace_event_common.h
+++ b/base/trace_event/common/trace_event_common.h
@@ -934,18 +934,22 @@
// TRACE_EVENT_METADATA* events are information related to other
// injected events, not events in their own right.
#define TRACE_EVENT_METADATA1(category_group, name, arg1_name, arg1_val) \
- INTERNAL_TRACE_EVENT_METADATA_ADD(category_group, name, arg1_name, arg1_val)
+ INTERNAL_TRACE_EVENT_METADATA_ADD_IF_ENABLED(category_group, name, \
+ arg1_name, arg1_val)
+#define TRACE_EVENT_METADATA_FORCED1(name, arg1_name, arg1_val) \
+ INTERNAL_TRACE_EVENT_METADATA_ADD_FORCED(TRACE_EVENT_PHASE_METADATA, name, \
+ arg1_name, arg1_val)
// Records a clock sync event.
-#define TRACE_EVENT_CLOCK_SYNC_RECEIVER(sync_id) \
- INTERNAL_TRACE_EVENT_ADD( \
- TRACE_EVENT_PHASE_CLOCK_SYNC, "__metadata", "clock_sync", \
- TRACE_EVENT_FLAG_NONE, "sync_id", sync_id)
-#define TRACE_EVENT_CLOCK_SYNC_ISSUER(sync_id, issue_ts, issue_end_ts) \
- INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \
- TRACE_EVENT_PHASE_CLOCK_SYNC, "__metadata", "clock_sync", \
- issue_end_ts.ToInternalValue(), TRACE_EVENT_FLAG_NONE, \
- "sync_id", sync_id, "issue_ts", issue_ts.ToInternalValue())
+#define TRACE_EVENT_CLOCK_SYNC_RECEIVER(sync_id) \
+ INTERNAL_TRACE_EVENT_METADATA_ADD_FORCED(TRACE_EVENT_PHASE_CLOCK_SYNC, \
+ "clock_sync", "sync_id", sync_id)
+
+#define TRACE_EVENT_CLOCK_SYNC_ISSUER(sync_id, issue_ts, issue_end_ts) \
+ INTERNAL_TRACE_EVENT_METADATA_ADD_FORCED_WITH_TIMESTAMP( \
+ TRACE_EVENT_PHASE_CLOCK_SYNC, "clock_sync", \
+ issue_end_ts.ToInternalValue(), "sync_id", sync_id, "issue_ts", \
+ issue_ts.ToInternalValue())
// Macros to track the life time and value of arbitrary client objects.
// See also TraceTrackableObject.
« no previous file with comments | « no previous file | base/trace_event/memory_dump_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698