[Stackless] Question abut slprofile.py
Kristján Valur Jónsson
kristjan at ccpgames.com
Fri Dec 19 15:54:00 CET 2008
Oh, and the files I attacheed may have other modifications, be sure to take only those having to do with "globaltrace"
From: Kristján Valur Jónsson
Sent: 19. desember 2008 14:53
To: Kristján Valur Jónsson; andrewfr_ice at yahoo.com; stackless at stackless.com
Subject: RE: [Stackless] Question abut slprofile.py
Blue is a module that is part of the eve engine.
It is used in this module solely to provide a timer. Just remove it, and line 22, and then you are all set.
Stackless has, since python 2.3, I think, a special "per tasklet" trace flag. That is, stackless saves and restores the trace flag in the python trhread state for each tasklet. This is an attempt, I think, at making profiling (and tracing) sensible, by focusing on a single tasklet only.
It is not very useful for us, however.
We want to have a running application, and then, just turn on profiling (using slprofile.Profile.start()) and stop it using slprofile.Profile.stop(), ans see what the app has been upto in the meantime.
In order to do this, we had to disable the per-tasklet saving feature of stackless.
I attach the three files that have the relevant modifications, for stackless 2.5
More information about the Stackless