Hacker News new | past | comments | ask | show | jobs | submit login
Profiling with Ctrl-C (yosefk.com)
4 points by jstanley 4 months ago | hide | past | favorite | 1 comment



Sad to see people are still unaware of modern perf profilers like hotspot, tracy, vtune, ...

they are easy to setup, work extremely efficient and can nowadays also catch off-cpu time. ctrl+c debugging finds you trivial stuff, but dismissing the real tools as unusable or inferior is simply ignorant.

> Unlike perf, gdb will give you a callstack even if the program was compiled without frame pointer support.

There is `--call-graph dwarf` and it exists since many years, and with `-z` it is pretty efficient and just works too - unless the stack gets too long, but even then it's good enough for profiling purposes...

> Also, sampling profilers are bad at tail latency - if something is usually fast but occasionally slow, you won’t be there to Ctrl-C it when it’s slow.

Very true, thankfully the flight recorder modes for profilers can help with that to a certain degree, with a potentially large sampling frequency.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: