Index: base/debug/trace_event_android.cc |
diff --git a/base/debug/trace_event_android.cc b/base/debug/trace_event_android.cc |
index 2901a3427f22fdc815c0b5fa5c3d380a89c416ee..51bec28e4d51abe4604e1e1eb55f397c820ad873 100644 |
--- a/base/debug/trace_event_android.cc |
+++ b/base/debug/trace_event_android.cc |
@@ -38,7 +38,7 @@ void TraceLog::StopATrace() { |
} |
void TraceLog::SendToATrace(char phase, |
- const char* category, |
+ const char* category_group, |
const char* name, |
int num_args, |
const char** arg_names, |
@@ -50,7 +50,8 @@ void TraceLog::SendToATrace(char phase, |
switch (phase) { |
case TRACE_EVENT_PHASE_BEGIN: |
case TRACE_EVENT_PHASE_INSTANT: { |
- std::string out = StringPrintf("B|%d|%s-%s", getpid(), category, name); |
+ std::string out = StringPrintf("B|%d|%s-%s", getpid(), category_group, |
nduca
2013/02/21 06:02:36
style nit - you could wrap this at the opening ( a
rterrazas
2013/02/25 05:55:02
Done.
|
+ name); |
for (int i = 0; i < num_args; ++i) { |
out += (i == 0 ? '|' : ';'); |
out += arg_names[i]; |
@@ -75,7 +76,8 @@ void TraceLog::SendToATrace(char phase, |
case TRACE_EVENT_PHASE_END: { |
// Though a single 'E' is enough, here append pid and name so that |
// unpaired events can be found easily. |
- std::string out = StringPrintf("E|%d|%s-%s", getpid(), category, name); |
+ std::string out = StringPrintf("E|%d|%s-%s", getpid(), category_group, |
+ name); |
write(g_atrace_fd, out.c_str(), out.size()); |
break; |
} |
@@ -84,7 +86,7 @@ void TraceLog::SendToATrace(char phase, |
DCHECK(arg_types[i] == TRACE_VALUE_TYPE_INT); |
std::string out = StringPrintf( |
"C|%d|%s-%s-%s|%d", |
- getpid(), category, name, |
+ getpid(), category_group, name, |
arg_names[i], static_cast<int>(arg_values[i])); |
write(g_atrace_fd, out.c_str(), out.size()); |
} |
@@ -97,11 +99,11 @@ void TraceLog::SendToATrace(char phase, |
} |
// Must be called with lock_ locked. |
-void TraceLog::ApplyATraceEnabledFlag(unsigned char* category_enabled) { |
+void TraceLog::ApplyATraceEnabledFlag(unsigned char* category_group_enabled) { |
if (g_atrace_fd != -1) |
- *category_enabled |= ATRACE_ENABLED; |
+ *category_group_enabled |= ATRACE_ENABLED; |
else |
- *category_enabled &= ~ATRACE_ENABLED; |
+ *category_group_enabled &= ~ATRACE_ENABLED; |
} |
} // namespace debug |