summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/executor.c3
-rw-r--r--Python/specialize.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/Python/executor.c b/Python/executor.c
index bfa7f7e..2884565 100644
--- a/Python/executor.c
+++ b/Python/executor.c
@@ -25,6 +25,7 @@
#undef DEOPT_IF
#define DEOPT_IF(COND, INSTNAME) \
if ((COND)) { \
+ UOP_STAT_INC(INSTNAME, miss); \
goto deoptimize; \
}
@@ -93,7 +94,7 @@ _PyUopExecute(_PyExecutorObject *executor, _PyInterpreterFrame *frame, PyObject
(int)(stack_pointer - _PyFrame_Stackbase(frame)));
pc++;
OPT_STAT_INC(uops_executed);
- UOP_EXE_INC(opcode);
+ UOP_STAT_INC(opcode, execution_count);
#ifdef Py_STATS
trace_uop_execution_counter++;
#endif
diff --git a/Python/specialize.c b/Python/specialize.c
index d74c4c5..41e74c6 100644
--- a/Python/specialize.c
+++ b/Python/specialize.c
@@ -248,6 +248,9 @@ print_optimization_stats(FILE *out, OptimizationStats *stats)
if (stats->opcode[i].execution_count) {
fprintf(out, "uops[%s].execution_count : %" PRIu64 "\n", names[i], stats->opcode[i].execution_count);
}
+ if (stats->opcode[i].miss) {
+ fprintf(out, "uops[%s].specialization.miss : %" PRIu64 "\n", names[i], stats->opcode[i].miss);
+ }
}
for (int i = 0; i < 256; i++) {