Skip to content

Commit

Permalink
Close #19199: Remove PyThreadState.tick_counter field
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Oct 9, 2013
1 parent 5c76cea commit 12af98b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
3 changes: 2 additions & 1 deletion Doc/whatsnew/3.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 0 additions & 10 deletions Include/pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 2 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 0 additions & 1 deletion Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 12af98b

Please sign in to comment.