Index: base/debug/trace_event.h |
diff --git a/base/debug/trace_event.h b/base/debug/trace_event.h |
index fc8897e1e73cf5e928a72552a24a604ed16ba2a5..9a1ed7488e5577c0d65b13def5412bf30d2a2e5b 100644 |
--- a/base/debug/trace_event.h |
+++ b/base/debug/trace_event.h |
@@ -19,6 +19,13 @@ |
// implicitly with a string. For example: |
// TRACE_EVENT_INSTANT0("MY_SUBSYSTEM", "SomeImportantEvent") |
// |
+// A category can be made up of several tags, for example: |
nduca
2013/01/28 08:15:28
The first argument to traces is a comma-separated
|
+// |
+// TRACE_EVENT_INSTANT0("MY_SUBSYSTEM_1, MY_SUB_SYSTEM_2", "ImportantEvent") |
nduca
2013/01/28 08:15:28
Lets give a concerete example here so its less abs
|
+// |
+// We can enable/disable tracing of ImportantEvent by enabling/disabling either |
+// tag. |
+// |
// Events can be INSTANT, or can be pairs of BEGIN and END in the same scope: |
// TRACE_EVENT_BEGIN0("MY_SUBSYSTEM", "SomethingCostly") |
// doSomethingCostly() |
@@ -101,7 +108,7 @@ |
// Tracing copies the pointers, not the string content, of the strings passed |
// in for category, name, and arg_names. Thus, the following code will |
// cause problems: |
-// char* str = strdup("impprtantName"); |
+// char* str = strdup("importantName"); |
// TRACE_EVENT_INSTANT0("SUBSYSTEM", str); // BAD! |
// free(str); // Trace system now has dangling pointer |
// |
@@ -113,13 +120,13 @@ |
// |
// When are string argument values copied: |
// const char* arg_values are only referenced by default: |
-// TRACE_EVENT1("category", "name", |
+// TRACE_EVENT1("category_tag1", "name", |
nduca
2013/01/28 08:15:28
i think its safe to say category once we make the
|
// "arg1", "literal string is only referenced"); |
// Use TRACE_STR_COPY to force copying of a const char*: |
-// TRACE_EVENT1("category", "name", |
+// TRACE_EVENT1("category_tag1", "name", |
// "arg1", TRACE_STR_COPY("string will be copied")); |
// std::string arg_values are always copied: |
-// TRACE_EVENT1("category", "name", |
+// TRACE_EVENT1("category_tag1", "name", |
// "arg1", std::string("string will be copied")); |
// |
// |