| Index: base/debug/trace_event.h
|
| diff --git a/base/debug/trace_event.h b/base/debug/trace_event.h
|
| index 58bd02370bff9bbefb4f02c1aa5c4535d33112b4..9c6e71da3d4fc858094d8dbe19b025276dabb1dc 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:
|
| +//
|
| +// TRACE_EVENT_INSTANT0("MY_SUBSYSTEM_1, MY_SUB_SYSTEM_2", "ImportantEvent")
|
| +//
|
| +// 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",
|
| // "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"));
|
| //
|
| //
|
|
|