in reply to Profiling forking code?

I have not tried this yet, but Devel::AutoProfile looks promising.

From the documentation:
... You can supply a callback which will be called at END time. This code reference will be passed a hash containing all the caller information in the form of a hash. Your callback routine can the do whatever it wishes with this information.

So, my suggestion would be to fix up the callback so that it writes to different places for each forked child.

Replies are listed 'Best First'.
Re: Re: Profiling forking code?
by RMGir (Prior) on Jan 13, 2003 at 19:45 UTC
    Cool looking module!

    The only problem I see for this application is how to avoid "double-counting" (or worse) things that happen before the fork(s).

    But the guts of D::AP seem remarkably straightforward, so adapting it to solve this problem shouldn't be impossible.
    --
    Mike

Re: Re: Profiling forking code?
by BrowserUk (Patriarch) on Jan 13, 2003 at 19:54 UTC

    That module looks promising, and it appears to be a pure perl module which alleviates several problems for those using AS. Unfortunately it requires Timer::HiRes::ualarm(), which isn't implemented on the Win32 platform. Drat!


    Examine what is said, not who speaks.

    The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.