Closed Bug 1529381 Opened 7 years ago Closed 6 years ago

Switch fix_macosx_stack.py from atos to llvm-symbolizer

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: kats, Unassigned)

References

Details

(Keywords: in-triage)

atos is really slow. In one case it took ~6 minutes to symbolicate a 7-frame stack (see bug 1525411 comment 11). llvm-symbolizer is faster, we should switch to it.

... although now I'm not sure if llvm-symbolizer can actually find the line number information that atos can.

For example:

$ /Applications/Xcode.app/Contents/Developer/usr/bin/atos -arch x86_64 -o /Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL
0xABC83
0xAC985
0x18939F
0x5671A20
0x567E825
0x567EFFD
0x100000FED
^D

emits:

nsAtomTable::GC(GCKind) (in XUL) (Mutex.h:168)
NS_ShutdownAtomTable() (in XUL) (nsAtomTable.cpp:484)
mozilla::ShutdownXPCOM(nsIServiceManager*) (in XUL) (XPCOMInit.cpp:779)
ScopedXPCOMStartup::~ScopedXPCOMStartup() (in XUL) (nsAppRunner.cpp:1314)
XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) (in XUL) (mozalloc.h:151)
XRE_main(int, char**, mozilla::BootstrapConfig const&) (in XUL) (nsAppRunner.cpp:4926)
0x100000FED

but what I think is the llvm-symbolizer equivalent:

$ ~/.mozbuild/clang/bin/llvm-symbolizer -obj=/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL
0xABC83
0xAC985
0x18939F
0x5671A20
0x567E825
0x567EFFD
0x100000FED
^D

gives me:

nsAtomTable::GC(GCKind)
??:0:0

NS_ShutdownAtomTable()
??:0:0

mozilla::ShutdownXPCOM(nsIServiceManager*)
??:0:0

ScopedXPCOMStartup::~ScopedXPCOMStartup()
??:0:0

XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&)
??:0:0

XRE_main(int, char**, mozilla::BootstrapConfig const&)
??:0:0

??
??:0:0

Note there's bug 1171115 on file for this, but filed under testing.

llvm-symbolizer may not support separate debug info, as is the default on OS X...

(In reply to Nathan Froyd [:froydnj] from comment #3)

llvm-symbolizer may not support separate debug info, as is the default on OS X...

ASAN's symbolizer script seems to try to use it: https://github.com/llvm-mirror/compiler-rt/blob/master/lib/asan/scripts/asan_symbolize.py

I feel like I tried to do this a year ago and it didn't end up being faster, but I can't find any records.

See Also: → 1543447

WONTFIXing this in favour of bug 1596292.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.