Skip to content

Commit

Permalink
Revert "Also attempt to symbolize dart frames in Profiler::DumpStackT…
Browse files Browse the repository at this point in the history
…race."

This reverts commit d215693.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2201953003 .
  • Loading branch information
rmacnak-google committed Aug 2, 2016
1 parent 375e5dd commit cdae2f2
Showing 1 changed file with 9 additions and 31 deletions.
40 changes: 9 additions & 31 deletions runtime/vm/profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}


Expand All @@ -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());
}


Expand Down

0 comments on commit cdae2f2

Please sign in to comment.