Hacker News new | ask | show | jobs
by tdiff 1522 days ago
I wonder if there is some support for dumping pt-traces only on some condition? Would be useful for debugging spikes in busy-loops.
1 comments

Absolutely! This is one of the main features of magic-trace, and in fact a primary use-case.

You can select a trigger symbol for magic-trace to snapshot upon the next call of. This can be whatever you want, and you can imagine writing code like

  if (something_really_wonky_happened) { take_magic_trace(); }
and asking magic-trace to take a snapshot of the past only when `take_magic_trace` is called.
Sounds great, thank you!