]> granicus.if.org Git - python/commitdiff
Close #19199: Remove ``PyThreadState.tick_counter`` field
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 9 Oct 2013 12:53:01 +0000 (14:53 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 9 Oct 2013 12:53:01 +0000 (14:53 +0200)
Doc/whatsnew/3.4.rst
Include/pystate.h
Misc/NEWS
Python/ceval.c
Python/pystate.c

index 81c2d8750c31ee63b6761525c0968facf91d7664..636d05d5b9c13ef43bcbd6b3a5ac0000e374c332 100644 (file)
@@ -523,7 +523,8 @@ Deprecated Python modules, functions and methods
 Deprecated functions and types of the C API
 -------------------------------------------
 
-* None yet.
+* The ``PyThreadState.tick_counter`` field has been value: its value was meaningless
+  since Python 3.2 ("new GIL").
 
 
 Deprecated features
index ddc68922cb1454408d239b5f5dde1394323ab40a..06af808444372e48f60c49720fe959b894b196ad 100644 (file)
@@ -100,16 +100,6 @@ typedef struct _ts {
 
     PyObject *dict;  /* Stores per-thread state */
 
-    /* XXX doesn't mean anything anymore (the comment below is obsolete)
-       => deprecate or remove? */
-    /* tick_counter is incremented whenever the check_interval ticker
-     * reaches zero. The purpose is to give a useful measure of the number
-     * of interpreted bytecode instructions in a given thread.  This
-     * extremely lightweight statistic collector may be of interest to
-     * profilers (like psyco.jit()), although nothing in the core uses it.
-     */
-    int tick_counter;
-
     int gilstate_counter;
 
     PyObject *async_exc; /* Asynchronous exception to raise */
index f2d96953afccbd0a0c171ba1f3104ace341a9019..c42d8d86878852a1d26e8ab8dee1008466f5f8de 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,8 @@ Projected release date: 2013-10-20
 Core and Builtins
 -----------------
 
+- Issue #19199: Remove ``PyThreadState.tick_counter`` field
+
 - Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at
   least one place so as to avoid regressions.
 
index dcfe8ec2aa3495fa38b76d5889bde97dce406227..2d52862a84f1fc8fa358d86f479aa5d181b1cc01 100644 (file)
@@ -1247,7 +1247,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                    a try: finally: block uninterruptible. */
                 goto fast_next_opcode;
             }
-            tstate->tick_counter++;
 #ifdef WITH_TSC
             ticked = 1;
 #endif
index ecd00ce5b421feb0a87e417e94649dc0b6e5b8fc..6be71de2ae0be662b4048f5de6ebf49a72a01a8c 100644 (file)
@@ -182,7 +182,6 @@ new_threadstate(PyInterpreterState *interp, int init)
         tstate->recursion_critical = 0;
         tstate->tracing = 0;
         tstate->use_tracing = 0;
-        tstate->tick_counter = 0;
         tstate->gilstate_counter = 0;
         tstate->async_exc = NULL;
 #ifdef WITH_THREAD