-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove PyThreadState.tick_counter field #63398
Comments
The C structure "PyThreadState" has a counter which is incremented in the bytecode evaluation loop (ceval.c), but never used. /* 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; Antoine Pitrou added the XXX comment when he merged the "new GIL" of Python 3.2. Can we now remove it? |
Yes, we can :) |
Here is a patch. I'm going to commit it in one week if nobody complains. |
Should there be a mention in whats new in case any external tools are (still) looking at it and thinking it is meaningful? |
PyThreadState.tick_counter field was added in 2002 by Armin Rigo: see issue bpo-617311. My patch will probably break the following module :-) The PyThreadState.tick_counter field was mentionned in the following question: Should we add a new counter to count the number of executed Python instructions per thread? Or fix tick_counter? Does we really need such counter or other profilers (cProfile) are enough? |
Let's just drop it. It's useless and nobody complained. |
Better remove this field if its value is now useless anyway. If someone needs it again for a similar reason, he can contribute a patch like I did in 2002 :-) |
New changeset 3ce0102e4c1f by Victor Stinner in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: