Skip to content

Commit 424023e

Browse files
authored
bpo-46329: Fix test failure when Py_STATS is enabled (GH-31511)
1 parent 288af84 commit 424023e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix specialization stats gathering for :opcode:`PRECALL` instructions.

Python/specialize.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ _Py_GetSpecializationStats(void) {
160160
err += add_stat_dict(stats, BINARY_OP, "binary_op");
161161
err += add_stat_dict(stats, COMPARE_OP, "compare_op");
162162
err += add_stat_dict(stats, UNPACK_SEQUENCE, "unpack_sequence");
163+
err += add_stat_dict(stats, PRECALL, "precall");
163164
if (err < 0) {
164165
Py_DECREF(stats);
165166
return NULL;
@@ -180,8 +181,6 @@ print_spec_stats(FILE *out, OpcodeStats *stats)
180181
/* Mark some opcodes as specializable for stats,
181182
* even though we don't specialize them yet. */
182183
fprintf(out, "opcode[%d].specializable : 1\n", FOR_ITER);
183-
fprintf(out, "opcode[%d].specializable : 1\n", PRECALL);
184-
fprintf(out, "opcode[%d].specializable : 1\n", UNPACK_SEQUENCE);
185184
for (int i = 0; i < 256; i++) {
186185
if (adaptive_opcodes[i]) {
187186
fprintf(out, "opcode[%d].specializable : 1\n", i);

0 commit comments

Comments
 (0)