]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
patch the graphviz dump
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Fri, 17 Oct 2025 10:02:31 +0000 (11:02 +0100)
committerKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Fri, 17 Oct 2025 10:02:31 +0000 (11:02 +0100)
Python/optimizer.c

index ed0e92bceb9c5fe8463904b99b1ba2a33e65af5c..67368fefa3452ea805623d375cb795374f8e86a1 100644 (file)
@@ -1662,6 +1662,7 @@ executor_to_gv(_PyExecutorObject *executor, FILE *out)
     fprintf(out, "]\n\n");
 
     /* Write all the outgoing edges */
+    _PyExecutorObject *cold = _PyExecutor_GetColdExecutor();
     for (uint32_t i = 0; i < executor->code_size; i++) {
         _PyUOpInstruction const *inst = &executor->trace[i];
         uint16_t flags = _PyUop_Flags[inst->opcode];
@@ -1675,7 +1676,7 @@ executor_to_gv(_PyExecutorObject *executor, FILE *out)
             assert(exit_inst->opcode == _EXIT_TRACE || exit_inst->opcode == _DYNAMIC_EXIT);
             exit = (_PyExitData *)exit_inst->operand0;
         }
-        if (exit != NULL && exit->executor != NULL) {
+        if (exit != NULL && exit->executor != cold) {
             fprintf(out, "executor_%p:i%d -> executor_%p:start\n", executor, i, exit->executor);
         }
         if (inst->opcode == _EXIT_TRACE || inst->opcode == _JUMP_TO_TOP) {