| Index: base/debug/trace_event_impl.h
|
| diff --git a/base/debug/trace_event_impl.h b/base/debug/trace_event_impl.h
|
| index 87cfa8cdfa2ead264fb8ac37c5d5e782660f51f5..83431fb54b091040d445aec7e97eca2fe5bab293 100644
|
| --- a/base/debug/trace_event_impl.h
|
| +++ b/base/debug/trace_event_impl.h
|
| @@ -176,26 +176,30 @@ class BASE_EXPORT TraceLog {
|
| // The known categories are inserted into |categories|.
|
| void GetKnownCategories(std::vector<std::string>* categories);
|
|
|
| - // Enable tracing for provided list of categories. If tracing is already
|
| - // enabled, this method does nothing -- changing categories during trace is
|
| - // not supported.
|
| - // If both included_categories and excluded_categories are empty,
|
| - // all categories are traced.
|
| - // Else if included_categories is non-empty, only those are traced.
|
| - // Else if excluded_categories is non-empty, everything but those are traced.
|
| + // Enable tracing for provided list of category tags. If tracing is already
|
| + // enabled, this method does nothing -- changing category tags during trace
|
| + // is not supported.
|
| + // If both included_tag_patterns and excluded_tag_patterns are empty,
|
| + // all categories are traced.
|
| + // Else if included_tag_patterns is non-empty, only those categories with
|
| + // matching tags are traced.
|
| + // Else if excluded_tag_patterns is non-empty, everything but those
|
| + // categories with matching tags are traced.
|
| // Wildcards * and ? are supported (see MatchPattern in string_util.h).
|
| - void SetEnabled(const std::vector<std::string>& included_categories,
|
| - const std::vector<std::string>& excluded_categories);
|
| + void SetEnabled(const std::vector<std::string>& included_tag_patterns,
|
| + const std::vector<std::string>& excluded_tag_patterns);
|
|
|
| - // |categories| is a comma-delimited list of category wildcards.
|
| - // A category can have an optional '-' prefix to make it an excluded category.
|
| + // |tag_patterns| is a comma-delimited list of category tag wildcards.
|
| + // A tag pattern can have an optional '-' prefix to exclude categories
|
| + // with matching tags excluded.
|
| + //
|
| // All the same rules apply above, so for example, having both included and
|
| - // excluded categories in the same list would not be supported.
|
| + // excluded category tags in the same list would not be supported.
|
| //
|
| // Example: SetEnabled("test_MyTest*");
|
| // Example: SetEnabled("test_MyTest*,test_OtherStuff");
|
| - // Example: SetEnabled("-excluded_category1,-excluded_category2");
|
| - void SetEnabled(const std::string& categories);
|
| + // Example: SetEnabled("-excluded_category_tag1,-excluded_category_tag2");
|
| + void SetEnabled(const std::string& tag_patterns);
|
|
|
| // Retieves the categories set via a prior call to SetEnabled(). Only
|
| // meaningful if |IsEnabled()| is true.
|
| @@ -250,6 +254,8 @@ class BASE_EXPORT TraceLog {
|
| void Flush(const OutputCallback& cb);
|
|
|
| // Called by TRACE_EVENT* macros, don't call this directly.
|
| + // The name parameter is a category name that can be made up of tags, for
|
| + // example: TRACE_EVENT0("renderer,webkit", "WebViewImpl::HandleInputEvent")
|
| static const unsigned char* GetCategoryEnabled(const char* name);
|
| static const char* GetCategoryName(const unsigned char* category_enabled);
|
|
|
| @@ -370,8 +376,8 @@ class BASE_EXPORT TraceLog {
|
| bool enabled_;
|
| NotificationCallback notification_callback_;
|
| std::vector<TraceEvent> logged_events_;
|
| - std::vector<std::string> included_categories_;
|
| - std::vector<std::string> excluded_categories_;
|
| + std::vector<std::string> included_tag_patterns_;
|
| + std::vector<std::string> excluded_tag_patterns_;
|
| bool dispatching_to_observer_list_;
|
| ObserverList<EnabledStateChangedObserver> enabled_state_observer_list_;
|
|
|
|
|