diff options
author | zhenw <zhenw@chromium.org> | 2015-06-02 14:46:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-02 21:46:59 +0000 |
commit | d601ddc554ca0e22fe7b91b93395a421e329ef83 (patch) | |
tree | e998d1bc0a5c78b9aa9af3b3bb672733c4c16a7e /components/tracing/child_trace_message_filter.cc | |
parent | 15f86fe47c852a07534d5293f1088445d76bee3e (diff) | |
download | chromium_src-d601ddc554ca0e22fe7b91b93395a421e329ef83.zip chromium_src-d601ddc554ca0e22fe7b91b93395a421e329ef83.tar.gz chromium_src-d601ddc554ca0e22fe7b91b93395a421e329ef83.tar.bz2 |
[Startup Tracing] Hook up TraceConfig and remove CategoryFilter & TraceOptions
This CL hooks up TraceConfig and removes CategoryFilter and TraceOptions. This is step 3 of the following.
1- Move current CategoryFilter and TraceOptions to new file.
2- Create TraceConfig but don't use it anywhere
3- Hookup TraceConfig and remove CategoryFilter and TraceOptions.
Background:
Implementing TraceConfig is the first stage for startup tracing.
Startup tracing design doc:
https://docs.google.com/document/d/1yRCXhrQ-0rsfUgNHt9T4YdnmJYrXKN6aK56Ozk3kPVc/edit?usp=sharing
TraceConfig class design doc:
https://docs.google.com/document/d/1zwc6FdeYyrC7m9fC4jJqbkqpB0il9NV-MWH7lEnL0cc/edit?usp=sharing
trace-config file format doc:
https://docs.google.com/document/d/1auY0Buk-R2tGCzpHJzFgyTfngXTAK0mlxJc6J4M_CK4/edit?usp=sharing
BUG=317481, 482098
TBR=phajdan.jr@chromium.org,nduca@chromium.org,michaelbai@chromium.org,tedchoc@chromium.org,pfeldman@chromium.org,perkj@chromium.org,ccameron@chromium.org,cbentzel@chromium.org,jam@chromium.org
Review URL: https://codereview.chromium.org/1165673002
Cr-Commit-Position: refs/heads/master@{#332467}
Diffstat (limited to 'components/tracing/child_trace_message_filter.cc')
-rw-r--r-- | components/tracing/child_trace_message_filter.cc | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/components/tracing/child_trace_message_filter.cc b/components/tracing/child_trace_message_filter.cc index 491d29c..ad34a24 100644 --- a/components/tracing/child_trace_message_filter.cc +++ b/components/tracing/child_trace_message_filter.cc @@ -57,9 +57,8 @@ bool ChildTraceMessageFilter::OnMessageReceived(const IPC::Message& message) { ChildTraceMessageFilter::~ChildTraceMessageFilter() {} void ChildTraceMessageFilter::OnBeginTracing( - const std::string& category_filter_str, - base::TraceTicks browser_time, - const std::string& options) { + const std::string& trace_config_str, + base::TraceTicks browser_time) { #if defined(__native_client__) // NaCl and system times are offset by a bit, so subtract some time from // the captured timestamps. The value might be off by a bit due to messaging @@ -67,12 +66,9 @@ void ChildTraceMessageFilter::OnBeginTracing( base::TimeDelta time_offset = base::TraceTicks::Now() - browser_time; TraceLog::GetInstance()->SetTimeOffset(time_offset); #endif - base::trace_event::TraceOptions trace_options; - trace_options.SetFromString(options); TraceLog::GetInstance()->SetEnabled( - base::trace_event::CategoryFilter(category_filter_str), - base::trace_event::TraceLog::RECORDING_MODE, - trace_options); + base::trace_event::TraceConfig(trace_config_str), + base::trace_event::TraceLog::RECORDING_MODE); } void ChildTraceMessageFilter::OnEndTracing() { @@ -87,15 +83,11 @@ void ChildTraceMessageFilter::OnEndTracing() { } void ChildTraceMessageFilter::OnEnableMonitoring( - const std::string& category_filter_str, - base::TraceTicks browser_time, - const std::string& options) { - base::trace_event::TraceOptions trace_options; - trace_options.SetFromString(options); + const std::string& trace_config_str, + base::TraceTicks browser_time) { TraceLog::GetInstance()->SetEnabled( - base::trace_event::CategoryFilter(category_filter_str), - base::trace_event::TraceLog::MONITORING_MODE, - trace_options); + base::trace_event::TraceConfig(trace_config_str), + base::trace_event::TraceLog::MONITORING_MODE); } void ChildTraceMessageFilter::OnDisableMonitoring() { |