diff options
Diffstat (limited to 'chromium/base/trace_event/trace_config.h')
-rw-r--r-- | chromium/base/trace_event/trace_config.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/chromium/base/trace_event/trace_config.h b/chromium/base/trace_event/trace_config.h index 9798c7f6ae9..3e3d0078a7f 100644 --- a/chromium/base/trace_event/trace_config.h +++ b/chromium/base/trace_event/trace_config.h @@ -242,6 +242,7 @@ class BASE_EXPORT TraceConfig { } void SetTraceBufferSizeInKb(size_t size) { trace_buffer_size_in_kb_ = size; } void EnableSystrace() { enable_systrace_ = true; } + void EnableSystraceEvent(const std::string& systrace_event); void EnableArgumentFilter() { enable_argument_filter_ = true; } void EnableHistogram(const std::string& histogram_name); @@ -255,6 +256,11 @@ class BASE_EXPORT TraceConfig { // Write the string representation of the CategoryFilter part. std::string ToCategoryFilterString() const; + // Write the string representation of the trace options part (record mode, + // systrace, argument filtering). Does not include category filters, event + // filters, or memory dump configs. + std::string ToTraceOptionsString() const; + // Returns true if at least one category in the list is enabled by this // trace config. This is used to determine if the category filters are // enabled in the TRACE_* macros. @@ -286,6 +292,10 @@ class BASE_EXPORT TraceConfig { event_filters_ = filter_configs; } + const std::unordered_set<std::string>& systrace_events() const { + return systrace_events_; + } + const std::unordered_set<std::string>& histogram_names() const { return histogram_names_; } @@ -294,6 +304,7 @@ class BASE_EXPORT TraceConfig { FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromValidLegacyFormat); FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, TraceConfigFromInvalidLegacyStrings); + FRIEND_TEST_ALL_PREFIXES(TraceConfigTest, SystraceEventsSerialization); // The default trace config, used when none is provided. // Allows all non-disabled-by-default categories through, except if they end @@ -317,8 +328,6 @@ class BASE_EXPORT TraceConfig { void SetEventFiltersFromConfigList(const Value& event_filters); Value ToValue() const; - std::string ToTraceOptionsString() const; - TraceRecordMode record_mode_; size_t trace_buffer_size_in_events_ = 0; // 0 specifies default size size_t trace_buffer_size_in_kb_ = 0; // 0 specifies default size @@ -332,6 +341,7 @@ class BASE_EXPORT TraceConfig { EventFilters event_filters_; std::unordered_set<std::string> histogram_names_; + std::unordered_set<std::string> systrace_events_; }; } // namespace trace_event |