mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Add pair counts to stats output and summary. (GH-31324)
This commit is contained in:
parent
15ee55528e
commit
0ade875ebe
2 changed files with 46 additions and 10 deletions
|
@ -174,13 +174,13 @@ print_spec_stats(FILE *out, OpcodeStats *stats)
|
|||
{
|
||||
/* Mark some opcodes as specializable for stats,
|
||||
* even though we don't specialize them yet. */
|
||||
fprintf(out, " opcode[%d].specializable : 1\n", FOR_ITER);
|
||||
fprintf(out, " opcode[%d].specializable : 1\n", PRECALL_FUNCTION);
|
||||
fprintf(out, " opcode[%d].specializable : 1\n", PRECALL_METHOD);
|
||||
fprintf(out, " opcode[%d].specializable : 1\n", UNPACK_SEQUENCE);
|
||||
fprintf(out, "opcode[%d].specializable : 1\n", FOR_ITER);
|
||||
fprintf(out, "opcode[%d].specializable : 1\n", PRECALL_FUNCTION);
|
||||
fprintf(out, "opcode[%d].specializable : 1\n", PRECALL_METHOD);
|
||||
fprintf(out, "opcode[%d].specializable : 1\n", UNPACK_SEQUENCE);
|
||||
for (int i = 0; i < 256; i++) {
|
||||
if (adaptive_opcodes[i]) {
|
||||
fprintf(out, " opcode[%d].specializable : 1\n", i);
|
||||
fprintf(out, "opcode[%d].specializable : 1\n", i);
|
||||
}
|
||||
PRINT_STAT(i, specialization.success);
|
||||
PRINT_STAT(i, specialization.failure);
|
||||
|
@ -196,6 +196,12 @@ print_spec_stats(FILE *out, OpcodeStats *stats)
|
|||
PRIu64 "\n", i, j, val);
|
||||
}
|
||||
}
|
||||
for(int j = 0; j < 256; j++) {
|
||||
if (stats[i].pair_count[j]) {
|
||||
fprintf(out, "opcode[%d].pair_count[%d] : %" PRIu64 "\n",
|
||||
i, j, stats[i].pair_count[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#undef PRINT_STAT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue