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..72901926cb1a535fc53b32e2135b64b616668aad 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/heap_profiler_scoped_ignore.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; |
+ HEAP_PROFILER_SCOPED_IGNORE; |
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; |
+ HEAP_PROFILER_SCOPED_IGNORE; |
Primiano Tucci (use gerrit)
2016/04/21 19:47:32
out of curiosity, why this is needed here? This sh
ssid
2016/04/22 04:57:12
Hm, I added this because if there are multiple tra
|
// 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) { |
+ HEAP_PROFILER_SCOPED_IGNORE; |
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) { |
+ HEAP_PROFILER_SCOPED_IGNORE; |
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() { |
+ HEAP_PROFILER_SCOPED_IGNORE; |
InternalTraceOptions options = trace_options(); |
if (options & kInternalRecordContinuously) |
return TraceBuffer::CreateTraceBufferRingBuffer( |