Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
savannahostrowski committed Sep 26, 2024
1 parent 8ff071f commit f238189
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -4838,9 +4838,9 @@ dummy_func(

tier2 op(_MAKE_WARM, (--)) {
current_executor->vm_data.warm = true;
if (++tstate->interp->trace_run_counter > JIT_CLEANUP_THRESHOLD) {
// It's okay if this ends up going negative.
if (--tstate->interp->trace_run_counter == 0) {
_Py_set_eval_breaker_bit(tstate, _PY_EVAL_JIT_INVALIDATE_COLD_BIT);
tstate->interp->trace_run_counter = 0;
}
}

Expand Down
1 change: 1 addition & 0 deletions Python/ceval_gil.c
Original file line number Diff line number Diff line change
Expand Up @@ -1292,6 +1292,7 @@ _Py_HandlePending(PyThreadState *tstate)
if ((breaker & _PY_EVAL_JIT_INVALIDATE_COLD_BIT) != 0) {
_Py_unset_eval_breaker_bit(tstate, _PY_EVAL_JIT_INVALIDATE_COLD_BIT);
_Py_Executors_InvalidateCold(tstate->interp);
tstate->interp->trace_run_counter = JIT_CLEANUP_THRESHOLD;
}

/* GIL drop request */
Expand Down
4 changes: 2 additions & 2 deletions Python/executor_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f238189

Please sign in to comment.