Chromium Code Reviews

Unified Diff: base/trace_event/trace_event_impl.cc

Issue 2162183002: Binds an ID to a Globally Unique ID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@netinst_macros
Patch Set: reimplemented Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: base/trace_event/trace_event_impl.cc
diff --git a/base/trace_event/trace_event_impl.cc b/base/trace_event/trace_event_impl.cc
index 510cc2ffac6b32add118eb53ed4147b4b70369d9..e01a2e94ac39bca53cae008f9312f2885959e068 100644
--- a/base/trace_event/trace_event_impl.cc
+++ b/base/trace_event/trace_event_impl.cc
@@ -362,6 +362,8 @@ void TraceEvent::AppendAsJSON(
if (scope_ != trace_event_internal::kGlobalScope)
StringAppendF(out, ",\"scope\":\"%s\"", scope_);
StringAppendF(out, ",\"id\":\"0x%" PRIx64 "\"", static_cast<uint64_t>(id_));
+ if (flags_ & TRACE_EVENT_FLAG_ID_IS_GLOBAL)
+ *out += ",\"id_is_global\":true";
}
if (flags_ & TRACE_EVENT_FLAG_BIND_TO_ENCLOSING)

Powered by Google App Engine