Hacker News new | past | comments | ask | show | jobs | submit login

Wow, I didn't know this technique had a name :) I used it today trying to figure out why a SharePoint application was eating up the CPU - break into debugger 6-7 times and 3 of those happened to be in the same function call or its children in the stack trace - problem found!



My team was writing a Linux-based PABX and a round of changes had caused lockups - but a weird kind. The machine was there, but just not responding. It wasn't dead, just maybe 100K times too slow. But when I hit alt-sysrq to shut the machine down and it responded instantly.

So I wrote an Alt-Sysrq handler that dumped the stack of the running process. The failed one was usually the one running so it was pretty easy to find, and then the stack trace told us enough about why it was deadlocked to make a fix without needing more investigation.

It was essentially just a one-sample sampling (monte-carlo) profiler.




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

Search: