Skip to content

Commit 44eb332

Browse files
committed
Remove 'world_stops' and 'sys._get_world_stops'.
This would be better to be part of the pystats info.
1 parent d4ce112 commit 44eb332

File tree

4 files changed

+1
-44
lines changed

4 files changed

+1
-44
lines changed

Include/internal/pycore_interp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ struct _stoptheworld_state {
5757
bool requested; // Set when a pause is requested.
5858
bool world_stopped; // Set when the world is stopped.
5959
bool is_global; // Set when contained in PyRuntime struct.
60-
Py_ssize_t world_stops; // Number of times the world was stopped.
6160

6261
PyEvent stop_event; // Set when thread_countdown reaches zero.
6362
Py_ssize_t thread_countdown; // Number of threads that must pause.

Python/clinic/sysmodule.c.h

Lines changed: 1 addition & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/pystate.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,7 +2355,6 @@ start_the_world(struct _stoptheworld_state *stw)
23552355
assert(PyMutex_IsLocked(&stw->mutex));
23562356

23572357
HEAD_LOCK(runtime);
2358-
stw->world_stops++;
23592358
stw->requested = 0;
23602359
stw->world_stopped = 0;
23612360
// Switch threads back to the detached state.
@@ -2731,7 +2730,6 @@ _PyGILState_Fini(PyInterpreterState *interp)
27312730
return;
27322731
}
27332732
interp->runtime->gilstate.autoInterpreterState = NULL;
2734-
//fprintf(stderr, "world stops %zd\n", interp->stoptheworld.world_stops);
27352733
}
27362734

27372735

Python/sysmodule.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2527,27 +2527,6 @@ sys__is_gil_enabled_impl(PyObject *module)
25272527
#endif
25282528
}
25292529

2530-
/*[clinic input]
2531-
sys._get_world_stops
2532-
2533-
Return the number of times the "stop-the-world" condition was true.
2534-
[clinic start generated code]*/
2535-
2536-
static PyObject *
2537-
sys__get_world_stops_impl(PyObject *module)
2538-
/*[clinic end generated code: output=7886d32b71a94e72 input=44a9bde7e07b30e3]*/
2539-
{
2540-
Py_ssize_t stops;
2541-
#ifdef Py_GIL_DISABLED
2542-
PyInterpreterState *interp = _PyInterpreterState_GET();
2543-
stops = interp->stoptheworld.world_stops;
2544-
#else
2545-
stops = 0;
2546-
#endif
2547-
return PyLong_FromLong(stops);
2548-
}
2549-
2550-
25512530

25522531
static PerfMapState perf_map_state;
25532532

@@ -2724,7 +2703,6 @@ static PyMethodDef sys_methods[] = {
27242703
#endif
27252704
SYS__GET_CPU_COUNT_CONFIG_METHODDEF
27262705
SYS__IS_GIL_ENABLED_METHODDEF
2727-
SYS__GET_WORLD_STOPS_METHODDEF
27282706
SYS__DUMP_TRACELETS_METHODDEF
27292707
{NULL, NULL} // sentinel
27302708
};

0 commit comments

Comments
 (0)