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

Unified Diff: base/trace_event/heap_profiler_allocation_context_tracker.h

Issue 2272843002: Heap Profiler: Add trace category group names as type names for allocations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_filter
Patch Set: Rebase. Created 4 years, 4 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/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 454200c474ee32be54c15e234cfa1753a8e580ce..c080c095b497c19fba240e65c61eb6c16bc7aa21 100644
--- a/base/trace_event/heap_profiler_allocation_context_tracker.h
+++ b/base/trace_event/heap_profiler_allocation_context_tracker.h
@@ -69,10 +69,10 @@ class BASE_EXPORT AllocationContextTracker {
}
// Pushes a frame onto the thread-local pseudo stack.
- void PushPseudoStackFrame(const char* trace_event_name);
+ void PushPseudoStackFrame(const char* category, const char* trace_event_name);
// Pops a frame from the thread-local pseudo stack.
- void PopPseudoStackFrame(const char* trace_event_name);
+ void PopPseudoStackFrame(const char* category, const char* trace_event_name);
// Push and pop current task's context. A stack is used to support nested
// tasks and the top of the stack will be used in allocation context.
@@ -99,6 +99,10 @@ class BASE_EXPORT AllocationContextTracker {
// pseudo stack to cluster allocations.
std::vector<const char*> task_contexts_;
+ // If task context was unavailable, then the category names from trace_events
+ // are used to cluster allcoations.
+ std::vector<const char*> trace_categories_;
+
uint32_t ignore_scope_depth_;
DISALLOW_COPY_AND_ASSIGN(AllocationContextTracker);

Powered by Google App Engine
This is Rietveld 408576698