Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
These samples are used to construct a profile of the activity of the process. It's not a "perfect" profile in that it will miss things that happen infrequently or take very little time, but that's entirely acceptable in a profiler. I used an in-house profiler with similar sounding functionality a few years back (with some C/assembler not Perl). While the non-invasiveness is handy it does come with it's own set of hassles. The period of the interrupt can sometimes mesh with the period of the events in your code giving misleading results. At its most basic you can have something like:
and have the interrupt occur in foo() every time because the period of the interrupt matches the period of the loop. Of course there are ways around this (vary the timing of the interrupt, run multiple profiles) - the technique is certainly not a bad idea in general. However unless you're paying attention the results can occasionally be a lot worse than 'perfectly acceptable'. In reply to Re: Dreaming of a Better Profiler
by adrianh
|
|