diff options
author | Michael Droettboom <mdboom@gmail.com> | 2023-10-05 15:12:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 15:12:06 (GMT) |
commit | 9eb2489266c4c1f115b8f72c0728db737cc8a815 (patch) | |
tree | 5803b53373eaff3fef48b53208e2dae001d27223 /Python | |
parent | 1328fa31fe9c72748fc6fd11d017c82aafd48a49 (diff) | |
download | cpython-9eb2489266c4c1f115b8f72c0728db737cc8a815.zip cpython-9eb2489266c4c1f115b8f72c0728db737cc8a815.tar.gz cpython-9eb2489266c4c1f115b8f72c0728db737cc8a815.tar.bz2 |
gh-109329: Add stat for "trace too short" (GH-110402)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/optimizer.c | 1 | ||||
-rw-r--r-- | Python/specialize.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Python/optimizer.c b/Python/optimizer.c index f8796eb..65b9638 100644 --- a/Python/optimizer.c +++ b/Python/optimizer.c @@ -798,6 +798,7 @@ done: return trace_length; } else { + OPT_STAT_INC(trace_too_short); DPRINTF(4, "No trace for %s (%s:%d) at byte offset %d\n", PyUnicode_AsUTF8(code->co_qualname), diff --git a/Python/specialize.c b/Python/specialize.c index ff732eb..49633b1 100644 --- a/Python/specialize.c +++ b/Python/specialize.c @@ -229,6 +229,7 @@ print_optimization_stats(FILE *out, OptimizationStats *stats) fprintf(out, "Optimization trace stack overflow: %" PRIu64 "\n", stats->trace_stack_overflow); fprintf(out, "Optimization trace stack underflow: %" PRIu64 "\n", stats->trace_stack_underflow); fprintf(out, "Optimization trace too long: %" PRIu64 "\n", stats->trace_too_long); + fprintf(out, "Optimization trace too short: %" PRIu64 "\n", stats->trace_too_short); fprintf(out, "Optimization inner loop: %" PRIu64 "\n", stats->inner_loop); fprintf(out, "Optimization recursive call: %" PRIu64 "\n", stats->recursive_call); |