Forked from
card10 / firmware
684 commits behind the upstream repository.
-
rahix authored
The poor-profiler scripts allow profiling card10 (to some degree). Signed-off-by:
Rahix <rahix@rahix.de>
rahix authoredThe poor-profiler scripts allow profiling card10 (to some degree). Signed-off-by:
Rahix <rahix@rahix.de>
README.md 1.61 KiB
poor-profiler
This is a (rather poor) attempt at building a profiler for card10. The idea is based on the poor man's profiler. Essentially, it uses stack-traces gathered using GDB. This means, execution will be significantly slowed down which might make certain features of the firmware misbehave. Use with care!
That said, here is how to use it:
- Configure the profiler by adjusting
nsamples
andsleeptime
inpoor-profiler.sh
. (If anyone wants to send a patch which makes this script use proper commandline args, please do!) - Start profiling! Just call
./tools/poor-profiler/poor-profiler.sh >/tmp/samples
- Next, collapse the samples using the
poor-collapse.sh
script:$ ./tools/poor-profiler/poor-collapse.sh /tmp/samples >/tmp/samples.collapsed
- Finally, feed the collapsed samples into the Brendan Gregg's
FlameGraph script which
will create an svg you can view (and interact with!) in your browser:
$ /path/to/FlameGraph/flamegraph.pl /tmp/samples.collapsed >/tmp/flamegraph.svg $ firefox /tmpflamegraph.svg
inferno-flamegraph
which is written in Rust ...)
Happy profiling!