Add pair counts to stats output and summary. (GH-31324)

This commit is contained in:
Mark Shannon 2022-02-14 15:53:38 +00:00 committed by GitHub
parent 15ee55528e
commit 0ade875ebe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 10 deletions

View file

@ -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