Extracting results from a large hotshot profile
Mike C. Fletcher
mcfletch at vrplumber.com
Mon Jan 16 13:09:24 EST 2006
Brian Cole wrote:
>Thanks for the tip. I got the following error message when trying to
>run your profiler.
>
>
...
> File "c:\Documents and Settings\coleb2\My Documents\software\Python24\Lib\site
>-packages\runsnakerun\hotshotreader.py", line 95, in loadHotshot
> localDeltas[depth] = 0
>IndexError: index out of bounds
>
>
...
>As the traceback shows I'm running this on Windows. I'm gonna go
>wrestle with installing wxPython and Numeric on my Linux box and see
>if that makes a difference.
>
>
Not likely. The hotshotreader module is creating an array of
sys.getrecursionlimit() long integers to store the accumulated local
times. It does the same to track the number of frames. Most likely
your main program is setting sys.getrecursionlimit explicitly and as a
result it winds up with a larger possible stack. You can try replacing
the sys.getrecursionlimit() calls with some big number (say 40,000, or
just multiply the recursion limit by 10 or 20 if you like) and see if
that solves the problem. Probably should allow for setting the value on
the command-line I guess. I suppose there may also be cases where a
recursive call to the interpreter gets a whole separate stack... or
maybe there's something going on with threads intermixing to create
greater depth.
Let me know if that helps,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
More information about the Python-list
mailing list