Index: base/trace_event/heap_profiler_allocation_context.h |
diff --git a/base/trace_event/heap_profiler_allocation_context.h b/base/trace_event/heap_profiler_allocation_context.h |
index 70ec7596661c8b2100e6d8083dbaddab36c0a4a7..04ed180cd181cef1a42d44f73408ebe230e1e800 100644 |
--- a/base/trace_event/heap_profiler_allocation_context.h |
+++ b/base/trace_event/heap_profiler_allocation_context.h |
@@ -44,6 +44,7 @@ struct BASE_EXPORT StackFrame { |
enum class Type { |
TRACE_EVENT_NAME, // const char* string |
THREAD_NAME, // const char* thread name |
+ PROGRAM_COUNTER, // as returned by stack tracing (e.g. by StackTrace) |
}; |
static StackFrame FromTraceEventName(const char* name) { |
@@ -52,6 +53,9 @@ struct BASE_EXPORT StackFrame { |
static StackFrame FromThreadName(const char* name) { |
return {Type::THREAD_NAME, name}; |
} |
+ static StackFrame FromProgramCounter(const void* pc) { |
+ return {Type::PROGRAM_COUNTER, pc}; |
+ } |
Type type; |
const void* value; |