From: Michael W. Hudson Date: Mon, 7 Oct 2002 09:40:20 +0000 (+0000) Subject: This is Armin Rigo's patch: X-Git-Tag: v2.2.2b1~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ddd3f0ea7bba0a55d4da05d2bb29e4394b5e03c0;p=thirdparty%2FPython%2Fcpython.git This is Armin Rigo's patch: [ 617311 ] Tiny profiling info (Psyco #2) Forward port candidate. --- diff --git a/Include/pystate.h b/Include/pystate.h index 712e9dc2b56d..675b44a4c4ea 100644 --- a/Include/pystate.h +++ b/Include/pystate.h @@ -69,6 +69,8 @@ typedef struct _ts { PyObject *dict; + int tick_counter; + /* XXX signal handlers should also be here */ } PyThreadState; diff --git a/Python/ceval.c b/Python/ceval.c index e8fefca8a8cc..3a5504b6e632 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -657,6 +657,7 @@ eval_frame(PyFrameObject *f) if (things_to_do || --tstate->ticker < 0) { tstate->ticker = tstate->interp->checkinterval; + tstate->tick_counter++; if (things_to_do) { if (Py_MakePendingCalls() < 0) { why = WHY_EXCEPTION;