News for hackers. Stuff that matters.
Re:Profiling with Ctrl-C by dooglius on Tuesday September 03, 2024 @12:13AM (#41431187)
I wonder how hard it would be to have a profiler dump a big chunk of stack on each sample interrupt, convert these into core dump format, and then use gdb or whatever to decode the traces for analysis? This ought to have the touted benefits without the downside of it being slow to capture a bunch of samples.
Re:Profiling with Ctrl-C by dzaima on Tuesday September 03, 2024 @12:37AM (#41431306)
I believe this is essentially what linux perf's "--call-graph dwarf" does. On my system that ends up producing ~33MB/s of recording data for ~4000 samples/s.
Re:Profiling with Ctrl-C by milianw on Tuesday September 03, 2024 @04:38AM (#41432677)
With `-z` (zstd compression) you can bring down the disk-space cost of dwarf unwinding by a factor of ~100 based on my personal experience.

to GP: What you describe sounds like https://github.com/koute/not-perf to me

Re:Profiling with Ctrl-C by dooglius on Wednesday September 04, 2024 @10:19AM (#41446162)
There are still issues with perf being unable to parse the debug format for some stuff, e.g. code compiled with `-ggdb3` as touched on in TFA. The idea is more: can I take one of the stacks that perf captured, and hand that off to GDB for a stack trace, without perf trying to parse/interpret it itself?
Re:Profiling with Ctrl-C by dzaima on Wednesday September 04, 2024 @05:38PM (#41451149)
perf's produced perf.data is a documented file format that you can parse manually if so desired, and does in fact directly store the 8KB of stack data (or whatever configured) & register values in the "dwarf" mode.