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

Unified Diff: base/trace_event/trace_config.h

Issue 1923533004: Tracing pre-filtering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | base/trace_event/trace_config.cc » ('j') | base/trace_event/trace_log.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_config.h
diff --git a/base/trace_event/trace_config.h b/base/trace_event/trace_config.h
index 72ca5f868785691b7686fef576f6eb59218c4592..8d9838acaf3874b743241e3540449f00b476433d 100644
--- a/base/trace_event/trace_config.h
+++ b/base/trace_event/trace_config.h
@@ -46,9 +46,24 @@ class BASE_EXPORT TraceConfig {
uint32_t periodic_interval_ms;
MemoryDumpLevelOfDetail level_of_detail;
};
-
typedef std::vector<MemoryDumpTriggerConfig> MemoryDumpConfig;
+ struct CategoryEventFilterConfig {
+ CategoryEventFilterConfig();
+ ~CategoryEventFilterConfig();
+
+ CategoryEventFilterConfig(const CategoryEventFilterConfig& tc);
+ CategoryEventFilterConfig& operator=(const CategoryEventFilterConfig& rhs);
+
+ bool IsCategoryGroupEnabled(const char* category_group_name) const;
+
+ std::string predicate_name;
+ StringList included_categories;
+ StringList excluded_categories;
+ std::unique_ptr<base::DictionaryValue> args;
+ };
+ typedef std::vector<CategoryEventFilterConfig> CategoryEventFilters;
+
TraceConfig();
// Create TraceConfig object from category filter and trace options strings.
@@ -143,6 +158,8 @@ class BASE_EXPORT TraceConfig {
// Return a list of the synthetic delays specified in this category filter.
const StringList& GetSyntheticDelayValues() const;
+ const CategoryEventFilters& GetCategoryEventFilters() const;
+
TraceRecordMode GetTraceRecordMode() const { return record_mode_; }
bool IsSamplingEnabled() const { return enable_sampling_; }
bool IsSystraceEnabled() const { return enable_systrace_; }
@@ -165,7 +182,7 @@ class BASE_EXPORT TraceConfig {
// Returns true if at least one category in the list is enabled by this
// trace config.
- bool IsCategoryGroupEnabled(const char* category_group) const;
+ bool IsCategoryGroupEnabled(const char* category_group_name) const;
// Merges config with the current TraceConfig
void Merge(const TraceConfig& config);
@@ -214,6 +231,8 @@ class BASE_EXPORT TraceConfig {
void SetMemoryDumpConfig(const base::DictionaryValue& memory_dump_config);
void SetDefaultMemoryDumpConfig();
+ void SetCategoryEventFilters(const base::ListValue& category_event_filters);
+
// Convert TraceConfig to the dict representation of the TraceConfig.
void ToDict(base::DictionaryValue& dict) const;
@@ -244,6 +263,7 @@ class BASE_EXPORT TraceConfig {
StringList disabled_categories_;
StringList excluded_categories_;
StringList synthetic_delays_;
+ CategoryEventFilters category_event_filters_;
};
} // namespace trace_event
« no previous file with comments | « no previous file | base/trace_event/trace_config.cc » ('j') | base/trace_event/trace_log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698