diff options
author | Michael Droettboom <mdboom@gmail.com> | 2024-03-21 17:27:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-21 17:27:46 (GMT) |
commit | 50369e6c34d05222e5a0ec9443a9f7b230e83112 (patch) | |
tree | db917d49c0ab14cb31520715390a10a1247e73ba /Python/specialize.c | |
parent | 617158e07811edfd6fd552a3d84b0beedd8f1d18 (diff) | |
download | cpython-50369e6c34d05222e5a0ec9443a9f7b230e83112.zip cpython-50369e6c34d05222e5a0ec9443a9f7b230e83112.tar.gz cpython-50369e6c34d05222e5a0ec9443a9f7b230e83112.tar.bz2 |
gh-116996: Add pystats about _Py_uop_analyse_and_optimize (GH-116997)
Diffstat (limited to 'Python/specialize.c')
-rw-r--r-- | Python/specialize.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Python/specialize.c b/Python/specialize.c index b1f9eb7..801ab1f 100644 --- a/Python/specialize.c +++ b/Python/specialize.c @@ -247,6 +247,8 @@ print_optimization_stats(FILE *out, OptimizationStats *stats) fprintf(out, "Optimization optimizer successes: %" PRIu64 "\n", stats->optimizer_successes); fprintf(out, "Optimization optimizer failure no memory: %" PRIu64 "\n", stats->optimizer_failure_reason_no_memory); + fprintf(out, "Optimizer remove globals builtins changed: %" PRIu64 "\n", stats->remove_globals_builtins_changed); + fprintf(out, "Optimizer remove globals incorrect keys: %" PRIu64 "\n", stats->remove_globals_incorrect_keys); const char* const* names; for (int i = 0; i <= MAX_UOP_ID; i++) { @@ -268,6 +270,17 @@ print_optimization_stats(FILE *out, OptimizationStats *stats) ); } } + + for (int i = 0; i < MAX_UOP_ID; i++) { + if (stats->error_in_opcode[i]) { + fprintf( + out, + "error_in_opcode[%s].count : %" PRIu64 "\n", + _PyUOpName(i), + stats->error_in_opcode[i] + ); + } + } } static void |