]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
This is Armin Rigo's patch:
authorMichael W. Hudson <mwh@python.net>
Mon, 7 Oct 2002 09:40:20 +0000 (09:40 +0000)
committerMichael W. Hudson <mwh@python.net>
Mon, 7 Oct 2002 09:40:20 +0000 (09:40 +0000)
[ 617311 ] Tiny profiling info (Psyco #2)

Forward port candidate.

Include/pystate.h
Python/ceval.c

index 712e9dc2b56d53da0be8cfdff6fe8fc8580285b7..675b44a4c4ea989a9b7605cfc9c6c800c37f4cc0 100644 (file)
@@ -69,6 +69,8 @@ typedef struct _ts {
 
     PyObject *dict;
 
+    int tick_counter;
+
     /* XXX signal handlers should also be here */
 
 } PyThreadState;
index e8fefca8a8cc7a24e49d068bb312496747b2d62a..3a5504b6e6328019cb13db84c882c0ec7a775b4e 100644 (file)
@@ -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;