4 ms·
Are perf and flamegraph the de facto tools for recording and viewing performance? I was looking for an alternative to Instruments (macOS) on Linux and I came a
by conradev 10y ago
Are perf and flamegraph the de facto tools for recording and viewing performance?
I was looking for an alternative to Instruments (macOS) on Linux and I came across callgrind and kcachegrind, which worked really well for me when profiling some Rust code.
- dikaiosune 10y agoI'm not sure what's de facto, but I most commonly see other Rust/Linux users reaching for valgrind (callgrind, cachegrind, etc). I've recently used massif (part of valgrind) for doing profiling of heap allocations, as well. In the past I also used oprofile because it gave me a nicely annotated source dump of sample rates in different statements. I am growing to like perf a lot, though. It seems (haven't measured though) to impose less runtime overhead, and the reporting and source annotation tools are top notch.
- cmrx64 10y agoIt's important to note that perf is a sampling profiler using the CPU performance monitoring unit, whereas callgrind (and all the valgrind tools, in general) uses processor emulation to record every event.