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

Unified Diff: runtime/vm/profiler.h

Issue 2771293003: Resubmission of native memory allocation info surfacing in Observatory. Fixed crashing tests and st… (Closed)
Patch Set: Removed garbage code, updated status file to skip service test not supported Created 3 years, 9 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: runtime/vm/profiler.h
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
index 49e59df6c83e4c3e194119268ca3387d64920920..1a44ed9f196ad37bf75c95c6b530fbd74eb07495 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -11,6 +11,7 @@
#include "vm/globals.h"
#include "vm/growable_array.h"
#include "vm/malloc_hooks.h"
+#include "vm/native_symbol.h"
#include "vm/object.h"
#include "vm/tags.h"
#include "vm/thread_interrupter.h"
@@ -220,6 +221,21 @@ class Sample {
pcs[i] = pc;
}
+ void DumpStackTrace() {
+ for (intptr_t i = 0; i < pcs_length_; ++i) {
+ uintptr_t start = 0;
+ uword pc = At(i);
+ char* native_symbol_name =
+ NativeSymbolResolver::LookupSymbolName(pc, &start);
+ if (native_symbol_name == NULL) {
+ OS::PrintErr(" [0x%" Pp "] Unknown symbol\n", pc);
+ } else {
+ OS::PrintErr(" [0x%" Pp "] %s\n", pc, native_symbol_name);
+ NativeSymbolResolver::FreeSymbolName(native_symbol_name);
+ }
+ }
+ }
+
uword vm_tag() const { return vm_tag_; }
void set_vm_tag(uword tag) {
ASSERT(tag != VMTag::kInvalidTagId);

Powered by Google App Engine
This is Rietveld 408576698