[Stackless] Need help: Profiling in stackless, and Psyco [Fixed]

Kristján V. Jónsson kristjan at ccpgames.com
Sun Dec 31 11:46:22 CET 2006


In particular, we didn't try to do anyting with cProfile.  It just crashed.  Perhaps it is not too difficult to do similar changes to cProfile?  The trick is to be able to keep track of different calling invocation chains and switch between them as tasklets switch.

One thing we learned here, when writing a much higher level profiler for EVE (One which one explicitly names and enters the timing contexts ratharn than implicitly using function invocations) is that it possible to offload much computation from the profile-time event to post-processing.  In particular, the code here is fairly complicated in the way it computes cumulative time.

We built a system whereby at profile time time was added up into a node in an "invocation tree", each node representing a unique reqursion into timing contexts.  Then you only need to accumulate time spent in each node.  During post processing, you have access to the whole tree and can then produce much more detailed information about cumulative time, callers, and callees.

Anyway, the extension to Stackless is then to maintain different "current" nodes in this tree for each different tasklet.

Cheers,
Kristján

-----Original Message-----
From: stackless-bounces at stackless.com [mailto:stackless-bounces at stackless.com] On Behalf Of Richard Tew
Sent: 30. desember 2006 20:21
To: stackless at stackless.com
Subject: Re: [Stackless] Need help: Profiling in stackless, and Psyco [Fixed]

On 12/30/06, Kristján V. Jónsson <kristjan at ccpgames.com> wrote:
> Here it is.

Thanks Kristjan.

Anyone want to take the ball and get this working?

slprofile.py may need some work over and above the work it needs
to get around the missing parts of CCP's framework which Kristjan
detailed as we still use Python 2.3.3 at CCP and profile.py may
have been changed.

Richard.

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list