diff options
author | zhenw <zhenw@chromium.org> | 2015-08-27 20:07:16 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-28 03:07:55 +0000 |
commit | de52fb95509666be1062b50a78bea36adfbac183 (patch) | |
tree | 626db79aacf3f16bea4ac54e5d5b77572df9faa1 /mandoline/app | |
parent | 9478f58e1bfc86d7732dd864a374a445e88ddceb (diff) | |
download | chromium_src-de52fb95509666be1062b50a78bea36adfbac183.zip chromium_src-de52fb95509666be1062b50a78bea36adfbac183.tar.gz chromium_src-de52fb95509666be1062b50a78bea36adfbac183.tar.bz2 |
[Startup Tracing] Add --trace-config-file flag
This CL adds --trace-config-file flag. Please see trace_config_file.h for details.
Design doc:
https://docs.google.com/document/d/1PgdXUOJF3WtEmYWUyGRbC2Fz2ICCZKO9jPvpLPRSHH8/edit?usp=sharing
BUG=317481, 482098
Review URL: https://codereview.chromium.org/1315463002
Cr-Commit-Position: refs/heads/master@{#346062}
Diffstat (limited to 'mandoline/app')
-rw-r--r-- | mandoline/app/DEPS | 2 | ||||
-rw-r--r-- | mandoline/app/desktop/launcher_process.cc | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/mandoline/app/DEPS b/mandoline/app/DEPS index 788a657..44f4e66 100644 --- a/mandoline/app/DEPS +++ b/mandoline/app/DEPS @@ -1,5 +1,5 @@ include_rules = [ - "+components/tracing/startup_tracing.h", + "+components/tracing", "+mojo", "+third_party/mojo/src/mojo/edk", "-third_party/mojo/src/mojo/edk/system", diff --git a/mandoline/app/desktop/launcher_process.cc b/mandoline/app/desktop/launcher_process.cc index afa1d15..132d033 100644 --- a/mandoline/app/desktop/launcher_process.cc +++ b/mandoline/app/desktop/launcher_process.cc @@ -15,7 +15,7 @@ #include "base/message_loop/message_loop.h" #include "base/synchronization/waitable_event.h" #include "base/trace_event/trace_event.h" -#include "components/tracing/startup_tracing.h" +#include "components/tracing/trace_config_file.h" #include "components/tracing/tracing_switches.h" #include "mandoline/app/core_services_initialization.h" #include "mandoline/app/desktop/launcher_process.h" @@ -90,10 +90,11 @@ int LauncherProcessMain(int argc, char** argv) { base::trace_event::RECORD_UNTIL_FULL); base::trace_event::TraceLog::GetInstance()->SetEnabled( trace_config, base::trace_event::TraceLog::RECORDING_MODE); - } else { - // |g_tracing| is not touched in this case and Telemetry will stop tracing - // on demand later. - tracing::EnableStartupTracingIfConfigFileExists(); + } else if (tracing::TraceConfigFile::GetInstance()->IsEnabled()) { + g_tracing = true; + base::trace_event::TraceLog::GetInstance()->SetEnabled( + tracing::TraceConfigFile::GetInstance()->GetTraceConfig(), + base::trace_event::TraceLog::RECORDING_MODE); } // We want the runner::Context to outlive the MessageLoop so that pipes are |