Stack sampling profiler: start profiling browser process main thread earlier |
||||||
Issue descriptionCurrently the profiler is started in the ChromeBrowserMainParts constructor, which occurs during the call to main_loop_->Init() in BrowserMainRunnerImpl::Initialize, after a fair amount of initialization has occurred. Moving the creation and start of the profiler earlier, possibly to ChromeMain, would allow us to observe more of the initialization.
,
Sep 11 2017
,
Sep 29 2017
https://chromium-review.googlesource.com/#/c/chromium/src/+/691239, though I haven't yet locally verified that this is all working correctly. It does compile and produce a binary that runs; I just need to figure out how to verify that the sampling is working.
,
Oct 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/65e27b1b16478877de9c5c31a12569a7f8c88a5b commit 65e27b1b16478877de9c5c31a12569a7f8c88a5b Author: Ilya Sherman <isherman@chromium.org> Date: Wed Oct 11 00:48:43 2017 [Sampling Profiler] Start sampling as early during initialization as possible. This will give us visibility into the performance of the earliest parts of startup as well as the later parts, which already have coverage. R=asvitkine@chromium.org Bug: 700083 Change-Id: I2fd2e76c00ca46754a57574dc3713ee641494a66 Reviewed-on: https://chromium-review.googlesource.com/691239 Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Mike Wittman <wittman@chromium.org> Reviewed-by: Alexei Svitkine <asvitkine@chromium.org> Commit-Queue: Ilya Sherman <isherman@chromium.org> Cr-Commit-Position: refs/heads/master@{#507843} [modify] https://crrev.com/65e27b1b16478877de9c5c31a12569a7f8c88a5b/chrome/BUILD.gn [modify] https://crrev.com/65e27b1b16478877de9c5c31a12569a7f8c88a5b/chrome/app/chrome_main.cc [add] https://crrev.com/65e27b1b16478877de9c5c31a12569a7f8c88a5b/chrome/app/profiler/BUILD.gn [add] https://crrev.com/65e27b1b16478877de9c5c31a12569a7f8c88a5b/chrome/app/profiler/DEPS [add] https://crrev.com/65e27b1b16478877de9c5c31a12569a7f8c88a5b/chrome/app/profiler/OWNERS [add] https://crrev.com/65e27b1b16478877de9c5c31a12569a7f8c88a5b/chrome/app/profiler/main_thread_stack_sampling_profiler.cc [add] https://crrev.com/65e27b1b16478877de9c5c31a12569a7f8c88a5b/chrome/app/profiler/main_thread_stack_sampling_profiler.h [modify] https://crrev.com/65e27b1b16478877de9c5c31a12569a7f8c88a5b/chrome/browser/chrome_browser_main.cc [modify] https://crrev.com/65e27b1b16478877de9c5c31a12569a7f8c88a5b/chrome/browser/chrome_browser_main.h [modify] https://crrev.com/65e27b1b16478877de9c5c31a12569a7f8c88a5b/chrome/gpu/chrome_content_gpu_client.cc [modify] https://crrev.com/65e27b1b16478877de9c5c31a12569a7f8c88a5b/chrome/gpu/chrome_content_gpu_client.h [modify] https://crrev.com/65e27b1b16478877de9c5c31a12569a7f8c88a5b/components/metrics/child_call_stack_profile_collector.cc [modify] https://crrev.com/65e27b1b16478877de9c5c31a12569a7f8c88a5b/components/metrics/child_call_stack_profile_collector.h
,
Oct 11 2017
,
Oct 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/aba2fd20b6636eab41e7cb7f879ff511b598b11f commit aba2fd20b6636eab41e7cb7f879ff511b598b11f Author: Jamie Madill <jmadill@chromium.org> Date: Wed Oct 11 14:20:37 2017 Revert "[Sampling Profiler] Start sampling as early during initialization as possible." This reverts commit 65e27b1b16478877de9c5c31a12569a7f8c88a5b. Reason for revert: Causes failures in the GPU FYI x64 bots and ANGLE CQ bots. See for example https://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20x64%20Release%20%28NVIDIA%29/builds/12511 [1010/202058.449:FATAL:at_exit.cc(58)] Check failed: false. Tried to RegisterCallback without an AtExitManager Backtrace: base::debug::StackTrace::StackTrace [0x000007FEEF138495+69] base::debug::StackTrace::StackTrace [0x000007FEEF112EC3+19] logging::LogMessage::~LogMessage [0x000007FEEF08BB3D+253] base::AtExitManager::RegisterTask [0x000007FEEF0FE469+105] base::AtExitManager::RegisterCallback [0x000007FEEF0FE3E2+258] base::trace_event::TraceEventETWExport::GetInstance [0x000007FEEF139EA0+112] base::trace_event::TraceEventETWExport::IsCategoryGroupEnabled [0x000007FEEF13A31D+125] base::trace_event::TraceLog::UpdateCategoryState [0x000007FEEF0A9333+371] base::trace_event::CategoryRegistry::GetOrCreateCategoryLocked [0x000007FEEF14105F+655] base::trace_event::TraceLog::GetCategoryGroupEnabled [0x000007FEEF0A7092+210] base::debug::TaskAnnotator::DidQueueTask [0x000007FEEF167705+53] base::internal::IncomingTaskQueue::AddToIncomingQueue [0x000007FEEF150E56+982] base::internal::MessageLoopTaskRunner::PostDelayedTask [0x000007FEEF151828+328] base::TaskRunner::PostTask [0x000007FEEF0C6043+67] base::StackSamplingProfiler::SamplingThread::Add [0x000007FEEF0ADAF2+354] base::StackSamplingProfiler::Start [0x000007FEEF0AF986+310] BUG=773681 Original change's description: > [Sampling Profiler] Start sampling as early during initialization as possible. > > This will give us visibility into the performance of the earliest parts of > startup as well as the later parts, which already have coverage. > > R=asvitkine@chromium.org > > Bug: 700083 > Change-Id: I2fd2e76c00ca46754a57574dc3713ee641494a66 > Reviewed-on: https://chromium-review.googlesource.com/691239 > Reviewed-by: Scott Violet <sky@chromium.org> > Reviewed-by: Mike Wittman <wittman@chromium.org> > Reviewed-by: Alexei Svitkine <asvitkine@chromium.org> > Commit-Queue: Ilya Sherman <isherman@chromium.org> > Cr-Commit-Position: refs/heads/master@{#507843} TBR=sky@chromium.org,wittman@chromium.org,isherman@chromium.org,asvitkine@chromium.org Change-Id: I28d3080b0fa47b953e9a8707511e8cf9bd05ed2d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 700083 Reviewed-on: https://chromium-review.googlesource.com/712854 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Cr-Commit-Position: refs/heads/master@{#507976} [modify] https://crrev.com/aba2fd20b6636eab41e7cb7f879ff511b598b11f/chrome/BUILD.gn [modify] https://crrev.com/aba2fd20b6636eab41e7cb7f879ff511b598b11f/chrome/app/chrome_main.cc [delete] https://crrev.com/249ceffbb5c6909ffdb4e0820d6a2dbb3f08aa6f/chrome/app/profiler/BUILD.gn [delete] https://crrev.com/249ceffbb5c6909ffdb4e0820d6a2dbb3f08aa6f/chrome/app/profiler/DEPS [delete] https://crrev.com/249ceffbb5c6909ffdb4e0820d6a2dbb3f08aa6f/chrome/app/profiler/OWNERS [delete] https://crrev.com/249ceffbb5c6909ffdb4e0820d6a2dbb3f08aa6f/chrome/app/profiler/main_thread_stack_sampling_profiler.cc [delete] https://crrev.com/249ceffbb5c6909ffdb4e0820d6a2dbb3f08aa6f/chrome/app/profiler/main_thread_stack_sampling_profiler.h [modify] https://crrev.com/aba2fd20b6636eab41e7cb7f879ff511b598b11f/chrome/browser/chrome_browser_main.cc [modify] https://crrev.com/aba2fd20b6636eab41e7cb7f879ff511b598b11f/chrome/browser/chrome_browser_main.h [modify] https://crrev.com/aba2fd20b6636eab41e7cb7f879ff511b598b11f/chrome/gpu/chrome_content_gpu_client.cc [modify] https://crrev.com/aba2fd20b6636eab41e7cb7f879ff511b598b11f/chrome/gpu/chrome_content_gpu_client.h [modify] https://crrev.com/aba2fd20b6636eab41e7cb7f879ff511b598b11f/components/metrics/child_call_stack_profile_collector.cc [modify] https://crrev.com/aba2fd20b6636eab41e7cb7f879ff511b598b11f/components/metrics/child_call_stack_profile_collector.h
,
Oct 11 2017
,
Oct 11 2017
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by asvitk...@chromium.org
, Apr 28 2017