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

Unified Diff: base/trace_event/heap_profiler_stack_frame_deduplicator.cc

Issue 1839503002: [tracing] Add native allocation tracing mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments 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
Index: base/trace_event/heap_profiler_stack_frame_deduplicator.cc
diff --git a/base/trace_event/heap_profiler_stack_frame_deduplicator.cc b/base/trace_event/heap_profiler_stack_frame_deduplicator.cc
index 22957804f137b38b44f1610e6621c698702bbbd3..49a235051c0731fd930bd7a897fc793cb867ab40 100644
--- a/base/trace_event/heap_profiler_stack_frame_deduplicator.cc
+++ b/base/trace_event/heap_profiler_stack_frame_deduplicator.cc
@@ -4,6 +4,7 @@
#include "base/trace_event/heap_profiler_stack_frame_deduplicator.h"
+#include <inttypes.h>
#include <stddef.h>
#include <string>
@@ -90,6 +91,12 @@ void StackFrameDeduplicator::AppendAsTraceFormat(std::string* out) const {
static_cast<const char*>(frame.value));
frame_node_value->SetString("name", stringify_buffer);
break;
+ case StackFrame::Type::PROGRAM_COUNTER:
+ SStringPrintf(&stringify_buffer,
+ "pc:%" PRIxPTR,
+ reinterpret_cast<uintptr_t>(frame.value));
+ frame_node_value->SetString("name", stringify_buffer);
+ break;
}
if (frame_node->parent_frame_index >= 0) {
SStringPrintf(&stringify_buffer, "%d", frame_node->parent_frame_index);

Powered by Google App Engine
This is Rietveld 408576698