News for hackers. Stuff that matters.
Re:Twenty Years of Valgrind (2022) by dennis_moore on Thursday August 29, 2024 @03:47AM (#41388357)
Which profilers in particular are you referring to because I've always thought that Callgrind is a profiler? perf?
Re:Twenty Years of Valgrind (2022) by rwmj on Thursday August 29, 2024 @05:42AM (#41388992)
perf on the whole system, with the whole software stack compiled with stack pointers, flamegraphs for visualisation, is an essential starting point for understanding real world performance problems.
Re:Twenty Years of Valgrind (2022) by Sesse__ on Thursday August 29, 2024 @08:17AM (#41390019)
perf or Intel VTune are the two standard choices AFAIK. Both have a certain learning curve, both are extremely capable in the right hands. (Well, on macOS you're pretty much locked to using Instruments; I don't know if Callgrind works there but would suspect it's an uphill battle.)

Callgrind is a CPU simulator that can output a profile of that simulation. I guess it's semantics whether you want to call that a profiler or not, but my point is that you don't need a simulator+profiler combo when you can just use a profiler on its own.

(There are exceptions where the determinism of Callgrind can be useful, like if you're trying to benchmark a really tiny change and are fine with the bias from the simulation diverging from reality, or if you explicitly care about call count instead of time spent.)