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

Unified Diff: base/trace_event/heap_profiler_allocation_context_tracker.h

Issue 2637783002: [tracing] Don't register tracing-related allocations. (Closed)
Patch Set: Fix unittest Created 3 years, 11 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 | « no previous file | base/trace_event/heap_profiler_allocation_context_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/heap_profiler_allocation_context_tracker.h
diff --git a/base/trace_event/heap_profiler_allocation_context_tracker.h b/base/trace_event/heap_profiler_allocation_context_tracker.h
index ae5f73af432bc9ecfb4aa87c8734238176490fe3..4f2a8c95026ac611350763ea4df674f8bd60c743 100644
--- a/base/trace_event/heap_profiler_allocation_context_tracker.h
+++ b/base/trace_event/heap_profiler_allocation_context_tracker.h
@@ -70,8 +70,8 @@ class BASE_EXPORT AllocationContextTracker {
static void SetCurrentThreadName(const char* name);
// Starts and ends a new ignore scope between which the allocations are
- // ignored in the heap profiler. A dummy context that short circuits to
- // "tracing_overhead" is returned for these allocations.
+ // ignored by the heap profiler. GetContextSnapshot() returns false when
+ // allocations are ignored.
void begin_ignore_scope() { ignore_scope_depth_++; }
void end_ignore_scope() {
if (ignore_scope_depth_)
@@ -89,8 +89,9 @@ class BASE_EXPORT AllocationContextTracker {
void PushCurrentTaskContext(const char* context);
void PopCurrentTaskContext(const char* context);
- // Returns a snapshot of the current thread-local context.
- AllocationContext GetContextSnapshot();
+ // Fills a snapshot of the current thread-local context. Doesn't fill and
+ // returns false if allocations are being ignored.
+ bool GetContextSnapshot(AllocationContext* snapshot);
~AllocationContextTracker();
« no previous file with comments | « no previous file | base/trace_event/heap_profiler_allocation_context_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698