in reply to Re: Perl thread profiler
in thread Perl thread profiler

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.

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

    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?

      I am basically looking to get the cpu/memory/blkio usage for each of the different threads in my process. I can get the usage for the process as a whole but that doesnt satisfy my purpose as I want to determine how my threads are effecting the box.

        On Windows, use perfmon.exe.


        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?