From cdae2f2783c5fc0661c8aa385105070c147b5482 Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Tue, 2 Aug 2016 15:14:43 -0700 Subject: [PATCH] Revert "Also attempt to symbolize dart frames in Profiler::DumpStackTrace." This reverts commit d215693513f883e3c59a97daacca01b1048d4820. R=johnmccutchan@google.com Review URL: https://codereview.chromium.org/2201953003 . --- runtime/vm/profiler.cc | 40 +++++++++------------------------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc index c1a74e45d260..21b8bf80871d 100644 --- a/runtime/vm/profiler.cc +++ b/runtime/vm/profiler.cc @@ -334,29 +334,14 @@ static void DumpStackFrame(intptr_t frame_index, uword pc) { uintptr_t start = 0; char* native_symbol_name = NativeSymbolResolver::LookupSymbolName(pc, &start); - if (native_symbol_name != NULL) { - OS::PrintErr(" %" Pp " [native] %s\n", pc, native_symbol_name); + if (native_symbol_name == NULL) { + OS::PrintErr("Frame[%" Pd "] = `unknown symbol` [0x%" Px "]\n", + frame_index, pc); + } else { + OS::PrintErr("Frame[%" Pd "] = `%s` [0x%" Px "]\n", + frame_index, native_symbol_name, pc); NativeSymbolResolver::FreeSymbolName(native_symbol_name); - return; - } - - Code& code = Code::Handle(Code::LookupCodeInVmIsolate(pc)); - if (code.IsNull()) { - code = Code::LookupCode(pc); // In current isolate. - } - if (code.IsNull()) { - OS::PrintErr(" %" Pp " [unknown]\n", pc); - return; - } - - const Object& owner = Object::Handle(code.owner()); - if (owner.IsFunction()) { - OS::PrintErr(" %" Pp " [dart] %s\n", pc, - Function::Cast(owner).ToFullyQualifiedCString()); - return; } - - OS::PrintErr(" %" Pp " [stub] %s\n", pc, code.ToCString()); } @@ -365,17 +350,10 @@ static void DumpStackFrame(intptr_t frame_index, const Code& code) { if (code.IsNull()) { DumpStackFrame(frame_index, pc); - return; - } - - const Object& owner = Object::Handle(code.owner()); - if (owner.IsFunction()) { - OS::PrintErr(" %" Pp " [dart] %s\n", pc, - Function::Cast(owner).ToFullyQualifiedCString()); - return; + } else { + OS::PrintErr("Frame[%" Pd "] = Dart:`%s` [0x%" Px "]\n", + frame_index, code.ToCString(), pc); } - - OS::PrintErr(" %" Pp " [stub] %s\n", pc, code.ToCString()); }