Index: base/trace_event/trace_log.cc |
diff --git a/base/trace_event/trace_log.cc b/base/trace_event/trace_log.cc |
index a0b12fbc5426fc1f357b4be8eb219a690ca2c647..4b4ccaafbd2b2884e72cff7f9d5bae17d660ef23 100644 |
--- a/base/trace_event/trace_log.cc |
+++ b/base/trace_event/trace_log.cc |
@@ -31,6 +31,7 @@ |
#include "base/threading/worker_pool.h" |
#include "base/time/time.h" |
#include "base/trace_event/heap_profiler_allocation_context_tracker.h" |
+#include "base/trace_event/malloc_dump_provider.h" |
#include "base/trace_event/memory_dump_manager.h" |
#include "base/trace_event/memory_dump_provider.h" |
#include "base/trace_event/process_memory_dump.h" |
@@ -391,6 +392,7 @@ void TraceLog::InitializeThreadLocalEventBufferIfSupported() { |
// trace events will be added into the main buffer directly. |
if (thread_blocks_message_loop_.Get() || !MessageLoop::current()) |
return; |
+ SCOPED_HEAP_PROFILER_IGNORE_MALLOC_EVENT; |
auto thread_local_event_buffer = thread_local_event_buffer_.Get(); |
if (thread_local_event_buffer && |
!CheckGeneration(thread_local_event_buffer->generation())) { |
@@ -907,6 +909,7 @@ void TraceLog::ConvertTraceEventsToTraceFormat( |
if (flush_output_callback.is_null()) |
return; |
+ SCOPED_HEAP_PROFILER_IGNORE_MALLOC_EVENT; |
// The callback need to be called at least once even if there is no events |
// to let the caller know the completion of flush. |
scoped_refptr<RefCountedString> json_events_str_ptr = new RefCountedString(); |
@@ -1341,6 +1344,7 @@ void TraceLog::AddMetadataEvent( |
const unsigned long long* arg_values, |
std::unique_ptr<ConvertableToTraceFormat>* convertable_values, |
unsigned int flags) { |
+ SCOPED_HEAP_PROFILER_IGNORE_MALLOC_EVENT; |
std::unique_ptr<TraceEvent> trace_event(new TraceEvent); |
int thread_id = static_cast<int>(base::PlatformThread::CurrentId()); |
ThreadTicks thread_now = ThreadNow(); |
@@ -1361,6 +1365,7 @@ void TraceLog::AddMetadataEvent( |
std::string TraceLog::EventToConsoleMessage(unsigned char phase, |
const TimeTicks& timestamp, |
TraceEvent* trace_event) { |
+ SCOPED_HEAP_PROFILER_IGNORE_MALLOC_EVENT; |
AutoLock thread_info_lock(thread_info_lock_); |
// The caller should translate TRACE_EVENT_PHASE_COMPLETE to |
@@ -1664,6 +1669,7 @@ void TraceLog::SetCurrentThreadBlocksMessageLoop() { |
} |
TraceBuffer* TraceLog::CreateTraceBuffer() { |
+ SCOPED_HEAP_PROFILER_IGNORE_MALLOC_EVENT; |
InternalTraceOptions options = trace_options(); |
if (options & kInternalRecordContinuously) |
return TraceBuffer::CreateTraceBufferRingBuffer( |