mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
GH-123232: Fix "not specialized" stats (GH-123236)
This commit is contained in:
parent
5fce482c9a
commit
0b0f7befad
4 changed files with 18 additions and 2 deletions
|
@ -144,8 +144,18 @@ print_spec_stats(FILE *out, OpcodeStats *stats)
|
|||
fprintf(out, "opcode[BINARY_SLICE].specializable : 1\n");
|
||||
fprintf(out, "opcode[STORE_SLICE].specializable : 1\n");
|
||||
for (int i = 0; i < 256; i++) {
|
||||
if (_PyOpcode_Caches[i] && i != JUMP_BACKWARD) {
|
||||
fprintf(out, "opcode[%s].specializable : 1\n", _PyOpcode_OpName[i]);
|
||||
if (_PyOpcode_Caches[i]) {
|
||||
/* Ignore jumps as they cannot be specialized */
|
||||
switch (i) {
|
||||
case POP_JUMP_IF_FALSE:
|
||||
case POP_JUMP_IF_TRUE:
|
||||
case POP_JUMP_IF_NONE:
|
||||
case POP_JUMP_IF_NOT_NONE:
|
||||
case JUMP_BACKWARD:
|
||||
break;
|
||||
default:
|
||||
fprintf(out, "opcode[%s].specializable : 1\n", _PyOpcode_OpName[i]);
|
||||
}
|
||||
}
|
||||
PRINT_STAT(i, specialization.success);
|
||||
PRINT_STAT(i, specialization.failure);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue