Commit 80d95b04 authored by Etienne Pierre-Doray's avatar Etienne Pierre-Doray Committed by Commit Bot

[SlowReport]: Add tracing sampling profiler to renderer process.

Instantiate TracingSamplerProfiler in RendererMain.

Change-Id: I527be13dcff3a58a4e60c8fe8ca21474515b91b0
Reviewed-on: https://chromium-review.googlesource.com/c/1336075Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avataroysteine <oysteine@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613178}
parent 1c00611c
......@@ -627,6 +627,7 @@ target(link_target_type, "renderer") {
"//components/metrics",
"//components/metrics:single_sample_metrics",
"//components/services/leveldb/public/cpp",
"//components/tracing",
"//components/url_formatter",
"//components/viz/client",
"//components/viz/common",
......
......@@ -5,6 +5,7 @@ include_rules = [
"+components/metrics",
"+components/metrics:single_sample_metrics",
"+components/payments",
"+components/tracing",
"+components/url_formatter",
"+components/viz/client",
"+components/viz/common",
......
......@@ -24,6 +24,7 @@
#include "base/timer/hi_res_timer_manager.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "components/tracing/common/tracing_sampler_profiler.h"
#include "content/common/content_constants_internal.h"
#include "content/common/content_switches_internal.h"
#include "content/common/service_manager/service_manager_connection_impl.h"
......@@ -210,6 +211,11 @@ int RendererMain(const MainFunctionParams& parameters) {
new RenderThreadImpl(run_loop.QuitClosure(),
std::move(main_thread_scheduler));
// Setup tracing sampler profiler as early as possible.
auto tracing_sampler_profiler =
tracing::TracingSamplerProfiler::CreateOnMainThread();
tracing_sampler_profiler->OnMessageLoopStarted();
if (need_sandbox)
should_run_loop = platform.EnableSandbox();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment