On Thu, Oct 17, 2024 at 2:49 PM Serhei Makarov <ser...@serhei.io> wrote: > > eu-stacktrace is a utility to process a stream of raw stack > samples (such as those obtained from the Linux kernel's > PERF_SAMPLE_STACK facility) into a stream of stack traces (such as > those obtained from PERF_SAMPLE_CALLCHAIN), freeing other profiling > utilities from having to implement their own backtracing logic. > > eu-stacktrace accepts data from a profiling tool via a pipe or > fifo. The initial version of the tool works on x86 architectures and > accepts data from Sysprof [1]. For future work, it will make sense > to expand support to other profilers, in particular perf tool. > > Further patches in this series provide configury, docs, and improved > diagnostics for tracking the method used to unwind each frame in the > stack trace. > > [1]: The following patched version of Sysprof (upstream submission ETA > ~very_soon) can produce data with stack samples: > > https://git.sr.ht/~serhei/sysprof-experiments/log/serhei/samples-via-fifo > > Invoking the patched sysprof with eu-stacktrace: > > $ sudo sysprof-cli --use-stacktrace > $ sudo sysprof-cli --use-stacktrace --stacktrace-path=/path/to/eu-stacktrace > > Invoking the patched sysprof and eu-stacktrace manually through a fifo: > > $ mkfifo /tmp/test.fifo > $ sudo eu-stacktrace --input /tmp/test.fifo --output test.syscap & > $ sysprof-cli --sample-method=stack --use-fifo=/tmp/test.fifo test.syscap > > Note that sysprof polkit actions must be installed systemwide > (e.g. installing the system sysprof package will provide these). > Otherwise, "Action org.gnome.sysprof3.profile is not registered" > error will result. > > * src/stacktrace.c: Add new tool. > > Signed-off-by: Serhei Makarov <ser...@serhei.io>
LGTM. eu-stacktrace is disabled by default even when sysprof headers are found and when enabled it builds with no errors. Please go ahead and merge. Thanks, Aaron