]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-116808: Fix optimized trace length histogram (GH-116827)
authorMichael Droettboom <mdboom@gmail.com>
Tue, 19 Mar 2024 11:06:43 +0000 (07:06 -0400)
committerGitHub <noreply@github.com>
Tue, 19 Mar 2024 11:06:43 +0000 (11:06 +0000)
Python/optimizer.c

index a6d6ffe53786366975c62c1cb1df27f8aa378836..bb00e0d25757845eb0f1fa4b2fe286cc7492d190 100644 (file)
@@ -913,6 +913,8 @@ make_executor_from_uops(_PyUOpInstruction *buffer, const _PyBloomFilter *depende
     if (executor == NULL) {
         return NULL;
     }
+    OPT_HIST(length, optimized_trace_length_hist);
+
     /* Initialize exits */
     for (int i = 0; i < exit_count; i++) {
         executor->exits[i].executor = &COLD_EXITS[i];
@@ -1051,7 +1053,6 @@ uop_optimize(
     if (executor == NULL) {
         return -1;
     }
-    OPT_HIST(Py_SIZE(executor), optimized_trace_length_hist);
     *exec_ptr = executor;
     return 1;
 }