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

Kristján V. Jónsson kristjan at ccpgames.com
Fri Dec 29 15:55:14 CET 2006


Here it is.  Note the line:

blue.pyos.contextHooks.append(self.context_dispatcher)

This adds our dispatcher to a context switch hook that we have in our blue framework.

This is ultimately installed by this call:

PyStackless_SetScheduleFastcallback(::OnTaskletSwitch);

 

This uses the callback that stackless produces on tasklet switch.  Invoking the profiler hook is one of the things we do then.

You could do something similar with stackless.set_schedule_callback()

 

Kristján

 

 

________________________________

From: stackless-bounces at stackless.com [mailto:stackless-bounces at stackless.com] On Behalf Of Adam Bark
Sent: 26. desember 2006 01:56
To: Kristján V. Jónsson
Cc: H. Song; Richard Tew; stackless at stackless.com
Subject: Re: [Stackless] Need help: Profiling in stackless, and Psyco [Fixed]

 

 

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

At CCP, we have patched stakcless to produce a special profiling event when tasklets
are switched.  This should probably be in vanilla stackless, switchable by a
flag, since without it, profiling becomes meaningless. 
We have also created a special version of the "profile" module which knows
how to cope with this event.  We can probably make that availible to the
community if anyone is interested.

Kristján


It sounds good to me if you wouldn't mind.
Cheers,
Adam. 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20061229/46040efa/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slprofile.py
Type: application/octet-stream
Size: 7162 bytes
Desc: slprofile.py
URL: <http://www.stackless.com/pipermail/stackless/attachments/20061229/46040efa/attachment.obj>
-------------- next part --------------
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless


More information about the Stackless mailing list