Ask HN: What's your best C/C++ profiling tool, hints and best practice?
1–10 of 13 posts
Re: Ask HN: What's your best C/C++ profiling tool, hints and best practice?
#2Re: Ask HN: What's your best C/C++ profiling tool, hints and best practice?
#3Re: Ask HN: What's your best C/C++ profiling tool, hints and best practice?
#4Very interested in this too
Re: Ask HN: What's your best C/C++ profiling tool, hints and best practice?
#5Re: Ask HN: What's your best C/C++ profiling tool, hints and best practice?
#6http://hpctoolkit.org/ https://www.cs.uoregon.edu/research/tau/home.php
Re: Ask HN: What's your best C/C++ profiling tool, hints and best practice?
#7Re: Ask HN: What's your best C/C++ profiling tool, hints and best practice?
#8valgrind's got some good features along these lines: http://valgrind.org/info/tools.html
Re: Ask HN: What's your best C/C++ profiling tool, hints and best practice?
#9valgrind's got some good features along these lines: http://valgrind.org/info/tools.html
Gprof is good too.
Re: Ask HN: What's your best C/C++ profiling tool, hints and best practice?
#10I've also tried vtune, but it doesn't support stack-tracing (or things like lbr) for system-wide profiling, and it doesn't have a specific option for sampling drivers. You can attach to the System process, but then you're missing a lot of the your driver code, that runs in other contexts.
I kept thinking about implementing my own sampling profiler (using LBR for stack-tracing, and hardware performance events, like linux's oprofile/ freebsd's hwpmc), but I can't see how I could only profile my driver, and not the whole system, without hooking the Windows scheduler. I guess I will just profile the whole system and check if the program counter is inside my module.