[Stackless] stackless profiling?

Sam M. Rushing srushing at ironport.com
Wed Aug 28 22:28:19 CEST 2002

> -----Original Message-----
> From: Jeff Senn [mailto:senn at maya.com]
> Sent: Wednesday, August 28, 2002 10:08 AM
> To: stackless at tismer.com
> Subject: Re: [Stackless] stackless profiling?
> Jeff Senn <senn at maya.com> writes:
> > I just tried using the profiler with stackless with ...um... mixed
> > success.
> ...
> Um... on looking closer at profile.py, it's going to need quite an
> overhaul to work with stackless -- in particular I think it will need
> to keep separate prior frame state around for each tasklet.  I'm not
> up to doing this at the moment...

Yeah, it's a big problem - the scheduler needs to be profiler-aware.  At
IronPort we had to hook the resume() interface to charge resources to
the appropriate coroutine/thread/tasklet.  Then we wrote a simple
(compared to profile.py) profiler callback that counts time in each
function - this was eventually recoded in C and integrated with the
scheduler itself.  Although it's not as sophisticated as the python
profiler, it records all the getrusage() info, which splits cpu into
real/user/sys, and gives us lots of other info like page swaps,
interrupts, etc...

Stackless mailing list
Stackless at www.tismer.com

More information about the Stackless mailing list