Hi Kristjan and Colleagues: I tried compiling the attached files with Python 2.5.1 (I used the tarball and placed the files in the appropriate directories). I received the following errors:
gcc -pthread -c -fno-strict-aliasing -DSTACKLESS_FRHACK=0 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I./Include -I./Stackless -DPy_BUILD_CORE -o Stackless/module/scheduling.o Stackless/module/scheduling.c Stackless/module/scheduling.c:159: error: conflicting types for ‘slp_bomb_explode’ ./Stackless/core/stackless_impl.h:397: error: previous declaration of ‘slp_bomb_explode’ was here Stackless/module/scheduling.c: In function ‘schedule_task_block’: Stackless/module/scheduling.c:596: error: ‘Py_WATCHDOG_THREADBLOCK’ undeclared (first use in this function) Stackless/module/scheduling.c:596: error: (Each undeclared identifier is reported only once Stackless/module/scheduling.c:596: error: for each function it appears in.) Stackless/module/scheduling.c: In function ‘slp_schedule_soft_irq’: Stackless/module/scheduling.c:769: error: ‘PY_WATCHDOG_SOFT’ undeclared (first use in this function) Stackless/module/scheduling.c:780: warning: implicit declaration of function ‘TASKLET_NESTING_OK’ Stackless/module/scheduling.c: In function ‘slp_schedule_task’: Stackless/module/scheduling.c:836: warning: implicit declaration of function ‘TASKLET_CLAIMVAL’ Stackless/module/scheduling.c:844: error: ‘PY_WATCHDOG_TOTALTIMEOUT’ undeclared (first use in this function) make: *** [Stackless/module/scheduling.o] Error 1 What am I doing wrong? Cheers, Andrew --- On Fri, 12/19/08, Kristján Valur Jónsson <[email protected]> wrote: > From: Kristján Valur Jónsson <[email protected]> > Subject: RE: [Stackless] Question abut slprofile.py > To: "Kristján Valur Jónsson" <[email protected]>, > "[email protected]" <[email protected]>, "[email protected]" > <[email protected]> > Date: Friday, December 19, 2008, 6:52 AM > 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 > > Good luck, > Kristján > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of > Kristján Valur Jónsson > Sent: 18. desember 2008 09:11 > To: [email protected]; [email protected] > Subject: Re: [Stackless] Question abut slprofile.py > > Attached. > Note that what we also used is a custom flag in stackless, > "globaltrace" which makes the tracing state of > python global (for the thread) instead of being maintained > for each tasklet. > Not only does it allow us to take a profiling > "snapshot" of a running application, it also > prevented crashes in stackless, which was crashing horribly > if any exceptions were being raised in the trace callbacks. > Actually, the last issue was fixed by us changing slprofile > to not rely on the stackless tasklet switching callbacks, > which tend to have weird behaviour, but rather just querying > for the current tasklet in the trace functions. > > If you want, I can provide you with the changed files to > the the "globaltrace" functionality, but it is a > little more work. > K > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Andrew > Francis > Sent: 17. desember 2008 22:17 > To: [email protected] > Subject: [Stackless] Question abut slprofile.py > > Hi Folks: > > A while ago, I recall a thread about using a modified > profile module, slprofile for use with Stackless. Where can > I find slprofile.py and its documentation? > > Thanks, > Andrew > > > > > _______________________________________________ > Stackless mailing list > [email protected] > http://www.stackless.com/mailman/listinfo/stackless _______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
