Skip to content

Commit cdae2f2

Browse files
Revert "Also attempt to symbolize dart frames in Profiler::DumpStackTrace."
This reverts commit d215693. [email protected] Review URL: https://codereview.chromium.org/2201953003 .
1 parent 375e5dd commit cdae2f2

File tree

1 file changed

+9
-31
lines changed

1 file changed

+9
-31
lines changed

runtime/vm/profiler.cc

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -334,29 +334,14 @@ static void DumpStackFrame(intptr_t frame_index, uword pc) {
334334
uintptr_t start = 0;
335335
char* native_symbol_name =
336336
NativeSymbolResolver::LookupSymbolName(pc, &start);
337-
if (native_symbol_name != NULL) {
338-
OS::PrintErr(" %" Pp " [native] %s\n", pc, native_symbol_name);
337+
if (native_symbol_name == NULL) {
338+
OS::PrintErr("Frame[%" Pd "] = `unknown symbol` [0x%" Px "]\n",
339+
frame_index, pc);
340+
} else {
341+
OS::PrintErr("Frame[%" Pd "] = `%s` [0x%" Px "]\n",
342+
frame_index, native_symbol_name, pc);
339343
NativeSymbolResolver::FreeSymbolName(native_symbol_name);
340-
return;
341-
}
342-
343-
Code& code = Code::Handle(Code::LookupCodeInVmIsolate(pc));
344-
if (code.IsNull()) {
345-
code = Code::LookupCode(pc); // In current isolate.
346-
}
347-
if (code.IsNull()) {
348-
OS::PrintErr(" %" Pp " [unknown]\n", pc);
349-
return;
350-
}
351-
352-
const Object& owner = Object::Handle(code.owner());
353-
if (owner.IsFunction()) {
354-
OS::PrintErr(" %" Pp " [dart] %s\n", pc,
355-
Function::Cast(owner).ToFullyQualifiedCString());
356-
return;
357344
}
358-
359-
OS::PrintErr(" %" Pp " [stub] %s\n", pc, code.ToCString());
360345
}
361346

362347

@@ -365,17 +350,10 @@ static void DumpStackFrame(intptr_t frame_index,
365350
const Code& code) {
366351
if (code.IsNull()) {
367352
DumpStackFrame(frame_index, pc);
368-
return;
369-
}
370-
371-
const Object& owner = Object::Handle(code.owner());
372-
if (owner.IsFunction()) {
373-
OS::PrintErr(" %" Pp " [dart] %s\n", pc,
374-
Function::Cast(owner).ToFullyQualifiedCString());
375-
return;
353+
} else {
354+
OS::PrintErr("Frame[%" Pd "] = Dart:`%s` [0x%" Px "]\n",
355+
frame_index, code.ToCString(), pc);
376356
}
377-
378-
OS::PrintErr(" %" Pp " [stub] %s\n", pc, code.ToCString());
379357
}
380358

381359

0 commit comments

Comments
 (0)