Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3892)

Unified Diff: base/trace_event/memory_dump_manager.cc

Issue 1900223003: [tracing] Ignore tracing allocations in heap profiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/trace_event/memory_dump_manager.cc
diff --git a/base/trace_event/memory_dump_manager.cc b/base/trace_event/memory_dump_manager.cc
index 53532b231242ff567e07486f680c1819cf6bb092..cd2c8e123fc36d6d6f53ea7531c94e7d513363fd 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -402,6 +402,7 @@ void MemoryDumpManager::CreateProcessDump(const MemoryDumpRequestArgs& args,
// (un)registrations of |dump_providers_|.
void MemoryDumpManager::SetupNextMemoryDump(
std::unique_ptr<ProcessMemoryDumpAsyncState> pmd_async_state) {
+ SCOPED_HEAP_PROFILER_IGNORE_MALLOC_EVENT;
// Initalizes the ThreadLocalEventBuffer to guarantee that the TRACE_EVENTs
// in the PostTask below don't end up registering their own dump providers
// (for discounting trace memory overhead) while holding the |lock_|.
@@ -474,6 +475,7 @@ void MemoryDumpManager::SetupNextMemoryDump(
// (unless disabled).
void MemoryDumpManager::InvokeOnMemoryDump(
ProcessMemoryDumpAsyncState* owned_pmd_async_state) {
+ SCOPED_HEAP_PROFILER_IGNORE_MALLOC_EVENT;
// In theory |owned_pmd_async_state| should be a scoped_ptr. The only reason
// why it isn't is because of the corner case logic of |did_post_task|
// above, which needs to take back the ownership of the |pmd_async_state| when
@@ -535,6 +537,7 @@ void MemoryDumpManager::InvokeOnMemoryDump(
// static
void MemoryDumpManager::FinalizeDumpAndAddToTrace(
std::unique_ptr<ProcessMemoryDumpAsyncState> pmd_async_state) {
+ SCOPED_HEAP_PROFILER_IGNORE_MALLOC_EVENT;
DCHECK(pmd_async_state->pending_dump_providers.empty());
const uint64_t dump_guid = pmd_async_state->req_args.dump_guid;
if (!pmd_async_state->callback_task_runner->BelongsToCurrentThread()) {

Powered by Google App Engine
This is Rietveld 408576698