diff --git a/Python/optimizer.c b/Python/optimizer.c index 5e97f20f869efd..8f75386f2e0cb6 100644 --- a/Python/optimizer.c +++ b/Python/optimizer.c @@ -1938,9 +1938,13 @@ static void executor_to_gv(_PyExecutorObject *executor, FILE *out) { PyCodeObject *code = executor->vm_data.code; + _PyExecutorObject *cold = _PyExecutor_GetColdExecutor(); + _PyExecutorObject *cold_dynamic = _PyExecutor_GetColdDynamicExecutor(); fprintf(out, "executor_%p [\n", executor); fprintf(out, " shape = none\n"); - + if (executor == cold || executor == cold_dynamic) { + fprintf(out, " color = gray\n"); + } /* Write the HTML table for the uops */ fprintf(out, " label = <\n"); fprintf(out, " \n"); @@ -1976,8 +1980,7 @@ executor_to_gv(_PyExecutorObject *executor, FILE *out) fprintf(out, "]\n\n"); /* Write all the outgoing edges */ - _PyExecutorObject *cold = _PyExecutor_GetColdExecutor(); - _PyExecutorObject *cold_dynamic = _PyExecutor_GetColdDynamicExecutor(); + for (uint32_t i = 0; i < executor->code_size; i++) { _PyUOpInstruction const *inst = &executor->trace[i]; uint16_t base_opcode = _PyUop_Uncached[inst->opcode];
Executor