jain.shardul has asked for the wisdom of the Perl Monks concerning the following question:

Anyone knows a cpan module for perl thread profiler? I already have a process profiler but I want to see which threads are using what and how much. Thanks.

Replies are listed 'Best First'.
Re: Perl thread profiler
by BrowserUk (Patriarch) on Mar 30, 2012 at 05:30 UTC

    What kind of profiler are you looking for? And what do you hope to achieve with it in conjunction with Perl's threading?


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      I've wanted to use a profiler on a multithreaded program before. I ended up just making a copy with the communications and AI threads commented out, and ran a few iterations of the physics loop using canned data

      It was a bit of trouble to ensure that the thread amputation didn't substantially alter the program flow, while making improvements to the two versions in parallel.

        I suspect from the OPs post, that he is looking for something like this, which is a very powerful tool.

        But, whilst I think it could be used to great affect to tune perl's internal implementation of threading; it is not so useful for tuning iThreads user code, as it is a binary level rather than source-code level profiler. Trying to separate out the affects of user code from those of the Perl runtime code is pretty much impossible.

        Like you, I also tend to tune my threaded Perl code by isolating each thread as far as possible and then tuning each thread in a stand-alone fashion.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        The start of some sanity?

Re: Perl thread profiler
by petdance (Parson) on Mar 29, 2012 at 21:45 UTC
    What you're looking for is CPAN, which stands for Comprehensive Perl Archive Network.

    C-SPAN is an American cable television network that offers coverage of federal government proceedings

    xoxo,
    Andy