Skip to content

Comment on Profiling with Ctrl-C (2024)

Comments

Once upon a time (maybe even before pthreads) I made an automatic version of this using SIGALARM for profiling.

I made a wrapper (using LD_PRELOAD) around XSelectInput that would trigger the signal 0.1 seconds after a keyboard/mouse (or other event) was received... Then it would dump stack traces every 0.1 seconds where "slow" UI code was being executed (before next call to XSelectInput).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.