mstange / samply

Command-line sampling profiler for macOS and Linux
Apache License 2.0
2.17k stars 56 forks source link

Implement --unstable-presymbolicate #202

Closed vvuk closed 4 months ago

vvuk commented 4 months ago

Adds --unstable-presymbolicate, which will output .syms.json file alongside the regular profile output. If that file is present when the server is fired up (based on the profile name, i.e. foo.json -> foo.syms.json), it is parsed and the data is added to be used when symbolicating. If a library has presymbolicated info (by debugid), only that info is used. There's no attempt to fall back to on-disk etc.

This allows a capture to be entirely self-contained, so that no symbol servers or on-disk data are needed for looking at the profile, which is very useful for running in CI or other locations where publishing the debuginfo isn't necessarily useful otherwise.

vvuk commented 4 months ago

Ok, implemented proper address/symbol info and properly implemented frames. Should have addressed all the review feedback here. I didn't make the GlobalLibIndex -> UsedLibraryHandle change, that can be a future thing