From 060a96f1a9a901b01ed304aa82b886d248ca1cb6 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 4 Apr 2024 08:03:27 -0700 Subject: gh-116968: Reimplement Tier 2 counters (#117144) Introduce a unified 16-bit backoff counter type (``_Py_BackoffCounter``), shared between the Tier 1 adaptive specializer and the Tier 2 optimizer. The API used for adaptive specialization counters is changed but the behavior is (supposed to be) identical. The behavior of the Tier 2 counters is changed: - There are no longer dynamic thresholds (we never varied these). - All counters now use the same exponential backoff. - The counter for ``JUMP_BACKWARD`` starts counting down from 16. - The ``temperature`` in side exits starts counting down from 64. --- Tools/jit/template.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Tools/jit/template.c') diff --git a/Tools/jit/template.c b/Tools/jit/template.c index 54160084cda..351bc2f3dd4 100644 --- a/Tools/jit/template.c +++ b/Tools/jit/template.c @@ -1,5 +1,6 @@ #include "Python.h" +#include "pycore_backoff.h" #include "pycore_call.h" #include "pycore_ceval.h" #include "pycore_cell.h" -- cgit v1.2.3