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

Unified Diff: base/trace_event/trace_buffer.cc

Issue 1900223003: [tracing] Ignore tracing allocations in heap profiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove cc file and inline. 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
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | base/trace_event/trace_event.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_buffer.cc
diff --git a/base/trace_event/trace_buffer.cc b/base/trace_event/trace_buffer.cc
index b9f80b27b6924daa5f62874a4104d3f49ed0c915..d40f4302fe6255d660c024063ea12f4b2b5b7507 100644
--- a/base/trace_event/trace_buffer.cc
+++ b/base/trace_event/trace_buffer.cc
@@ -9,6 +9,7 @@
#include <vector>
#include "base/macros.h"
+#include "base/trace_event/heap_profiler.h"
#include "base/trace_event/trace_event_impl.h"
namespace base {
@@ -31,6 +32,8 @@ class TraceBufferRingBuffer : public TraceBuffer {
}
std::unique_ptr<TraceBufferChunk> GetChunk(size_t* index) override {
+ HEAP_PROFILER_SCOPED_IGNORE;
+
// Because the number of threads is much less than the number of chunks,
// the queue should never be empty.
DCHECK(!QueueIsEmpty());
@@ -158,6 +161,8 @@ class TraceBufferVector : public TraceBuffer {
}
std::unique_ptr<TraceBufferChunk> GetChunk(size_t* index) override {
+ HEAP_PROFILER_SCOPED_IGNORE;
+
// This function may be called when adding normal events or indirectly from
// AddMetadataEventsWhileLocked(). We can not DECHECK(!IsFull()) because we
// have to add the metadata events and flush thread-local buffers even if
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | base/trace_event/trace_event.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698