mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-115178: Add Counts of UOp Pairs to pystats (GH-115181)
This commit is contained in:
parent
c053d52edd
commit
acf69e09c6
6 changed files with 26 additions and 4 deletions
|
@ -11,6 +11,7 @@
|
|||
#include "pycore_object.h"
|
||||
#include "pycore_opcode_metadata.h" // _PyOpcode_Caches
|
||||
#include "pycore_uop_metadata.h" // _PyOpcode_uop_name
|
||||
#include "pycore_uop_ids.h" // MAX_UOP_ID
|
||||
#include "pycore_opcode_utils.h" // RESUME_AT_FUNC_START
|
||||
#include "pycore_pylifecycle.h" // _PyOS_URandomNonblock()
|
||||
#include "pycore_runtime.h" // _Py_ID()
|
||||
|
@ -269,6 +270,14 @@ print_optimization_stats(FILE *out, OptimizationStats *stats)
|
|||
}
|
||||
}
|
||||
|
||||
for (int i = 1; i <= MAX_UOP_ID; i++){
|
||||
for (int j = 1; j <= MAX_UOP_ID; j++) {
|
||||
if (stats->opcode[i].pair_count[j]) {
|
||||
fprintf(out, "uop[%s].pair_count[%s] : %" PRIu64 "\n",
|
||||
_PyOpcode_uop_name[i], _PyOpcode_uop_name[j], stats->opcode[i].pair_count[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < MAX_UOP_ID; i++) {
|
||||
if (stats->error_in_opcode[i]) {
|
||||
fprintf(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue