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 20a6e3015d647aaad1272e3c36cc03e93d2c8eb6..5d32c64952266475fcb440476febf208f618a39f 100644 |
--- a/base/trace_event/heap_profiler_allocation_context_tracker.h |
+++ b/base/trace_event/heap_profiler_allocation_context_tracker.h |
@@ -48,6 +48,10 @@ class BASE_EXPORT AllocationContextTracker { |
// returns nullptr in the nested calls. |
static AllocationContextTracker* GetInstanceForCurrentThread(); |
+ // Set the thread name in the AllocationContextTracker of current thread if |
petrcermak
2016/03/29 13:07:46
nit: s/current/the current/
ssid
2016/03/29 18:19:11
Done.
|
+ // capture is enabled. |
+ static void SetCurrentThreadName(const char* name); |
+ |
// Pushes a frame onto the thread-local pseudo stack. |
void PushPseudoStackFrame(StackFrame frame); |
@@ -67,6 +71,9 @@ class BASE_EXPORT AllocationContextTracker { |
// The pseudo stack where frames are |TRACE_EVENT| names. |
std::vector<StackFrame> pseudo_stack_; |
+ // The thread name is used as the first entry in the pseudo stack. |
+ const char* thread_name_; |
+ |
DISALLOW_COPY_AND_ASSIGN(AllocationContextTracker); |
}; |