mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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.)
This commit is contained in:
parent
c283a0cff5
commit
11731434df
4 changed files with 153 additions and 78 deletions
|
@ -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++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue