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

Unified Diff: base/trace_event/blame_context.cc

Issue 2253973003: Add an explicit way of making IDs local or global (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
Index: base/trace_event/blame_context.cc
diff --git a/base/trace_event/blame_context.cc b/base/trace_event/blame_context.cc
index ae5c6790d6e12a1bc6cfa8a8f56a606070bc015c..b21ea41bccb7dac47d3aabaa524d5694c635e4b8 100644
--- a/base/trace_event/blame_context.cc
+++ b/base/trace_event/blame_context.cc
@@ -35,7 +35,8 @@ BlameContext::~BlameContext() {
DCHECK(WasInitialized());
TRACE_EVENT_API_ADD_TRACE_EVENT(
TRACE_EVENT_PHASE_DELETE_OBJECT, category_group_enabled_, type_, scope_,
- id_, 0, nullptr, nullptr, nullptr, nullptr, TRACE_EVENT_FLAG_HAS_ID);
+ id_, 0, nullptr, nullptr, nullptr, nullptr,
+ TRACE_EVENT_FLAG_HAS_LOCAL_ID);
trace_event::TraceLog::GetInstance()->RemoveAsyncEnabledStateObserver(this);
}
@@ -44,7 +45,7 @@ void BlameContext::Enter() {
TRACE_EVENT_API_ADD_TRACE_EVENT(TRACE_EVENT_PHASE_ENTER_CONTEXT,
category_group_enabled_, name_, scope_, id_,
0 /* num_args */, nullptr, nullptr, nullptr,
- nullptr, TRACE_EVENT_FLAG_HAS_ID);
+ nullptr, TRACE_EVENT_FLAG_HAS_LOCAL_ID);
}
void BlameContext::Leave() {
@@ -52,7 +53,7 @@ void BlameContext::Leave() {
TRACE_EVENT_API_ADD_TRACE_EVENT(TRACE_EVENT_PHASE_LEAVE_CONTEXT,
category_group_enabled_, name_, scope_, id_,
0 /* num_args */, nullptr, nullptr, nullptr,
- nullptr, TRACE_EVENT_FLAG_HAS_ID);
+ nullptr, TRACE_EVENT_FLAG_HAS_LOCAL_ID);
}
void BlameContext::TakeSnapshot() {
@@ -71,7 +72,7 @@ void BlameContext::TakeSnapshot() {
TRACE_EVENT_API_ADD_TRACE_EVENT(TRACE_EVENT_PHASE_SNAPSHOT_OBJECT,
category_group_enabled_, type_, scope_, id_,
kNumArgs, &kArgName, arg_types, nullptr,
- arg_values, TRACE_EVENT_FLAG_HAS_ID);
+ arg_values, TRACE_EVENT_FLAG_HAS_LOCAL_ID);
}
void BlameContext::OnTraceLogEnabled() {
@@ -97,7 +98,8 @@ void BlameContext::Initialize() {
TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(category_);
TRACE_EVENT_API_ADD_TRACE_EVENT(
TRACE_EVENT_PHASE_CREATE_OBJECT, category_group_enabled_, type_, scope_,
- id_, 0, nullptr, nullptr, nullptr, nullptr, TRACE_EVENT_FLAG_HAS_ID);
+ id_, 0, nullptr, nullptr, nullptr, nullptr,
+ TRACE_EVENT_FLAG_HAS_LOCAL_ID);
trace_event::TraceLog::GetInstance()->AddAsyncEnabledStateObserver(
weak_factory_.GetWeakPtr());
TakeSnapshot();
« no previous file with comments | « no previous file | base/trace_event/common/trace_event_common.h » ('j') | base/trace_event/common/trace_event_common.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698