Commit f26c826a authored by Matthew Cary's avatar Matthew Cary Committed by Commit Bot

Orderfile: do not instrument MemoryDumpProvider.

When compiled with devtools_instrumentation_dumping=true, orderfile
profile dumps are triggered by MemoryDumpProvider::OnMemoryDump. We mark
the overriden function used to control the orderfile as
not-to-be-instrumented in order to keep the profile as clean as
possible.

Bug: 843561
Change-Id: I710029753d776fac182b16fcce8aa6c7f5738f83
Reviewed-on: https://chromium-review.googlesource.com/1109970Reviewed-by: default avatarBenoit L <lizeb@chromium.org>
Reviewed-by: default avatarEgor Pasko <pasko@chromium.org>
Reviewed-by: default avataragrieve <agrieve@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570031}
parent 1256946d
......@@ -75,8 +75,9 @@ std::atomic<int> g_data_index;
// Dump offsets when a memory dump is requested. Used only if
// switches::kDevtoolsInstrumentationDumping is set.
class OrderfileMemoryDumpHook : public base::trace_event::MemoryDumpProvider {
bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
base::trace_event::ProcessMemoryDump* pmd) override {
NO_INSTRUMENT_FUNCTION bool OnMemoryDump(
const base::trace_event::MemoryDumpArgs& args,
base::trace_event::ProcessMemoryDump* pmd) override {
// Disable instrumentation now to cut down on orderfile pollution.
if (!Disable()) {
return true; // A dump has already been started.
......
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