diff options
author | Guido van Rossum <guido@python.org> | 2023-06-28 18:28:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 18:28:07 (GMT) |
commit | 11731434df2d7d29b4260e5ad65b993cea775c36 (patch) | |
tree | ef3afdb759174a31e607534a0daa3d8a4606bd28 /Python/ceval.c | |
parent | c283a0cff5603540f06d9017e484b3602cc62e7c (diff) | |
download | cpython-11731434df2d7d29b4260e5ad65b993cea775c36.zip cpython-11731434df2d7d29b4260e5ad65b993cea775c36.tar.gz cpython-11731434df2d7d29b4260e5ad65b993cea775c36.tar.bz2 |
gh-104584: Emit macro expansions to opcode_metadata.h (#106163)
This produces longer traces (superblocks?).
Also improved debug output (uop names are now printed instead of numeric opcodes). This would be simpler if the numeric opcode values were generated by generate_cases.py, but that's another project.
Refactored some code in generate_cases.py so the essential algorithm for cache effects is only run once. (Deciding which effects are used and what the total cache size is, regardless of what's used.)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index e19860d..65b6f24 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2817,10 +2817,10 @@ _PyUopExecute(_PyExecutorObject *executor, _PyInterpreterFrame *frame, PyObject oparg = (int)operand; #ifdef LLTRACE if (lltrace >= 3) { - const char *opname = opcode < 256 ? _PyOpcode_OpName[opcode] : ""; + const char *opname = opcode < 256 ? _PyOpcode_OpName[opcode] : _PyOpcode_uop_name[opcode]; int stack_level = (int)(stack_pointer - _PyFrame_Stackbase(frame)); - fprintf(stderr, " uop %s %d, operand %" PRIu64 ", stack_level %d\n", - opname, opcode, operand, stack_level); + fprintf(stderr, " uop %s, operand %" PRIu64 ", stack_level %d\n", + opname, operand, stack_level); } #endif pc++; |