gh-112320: Implement on-trace confidence tracking for branches (#112321)

We track the confidence as a scaled int.
This commit is contained in:
Guido van Rossum 2023-12-12 13:43:08 -08:00 committed by GitHub
parent dfaa9e060b
commit 7316dfb0eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 56 additions and 3 deletions

View file

@ -233,6 +233,7 @@ print_optimization_stats(FILE *out, OptimizationStats *stats)
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);
fprintf(out, "Optimization low confidence: %" PRIu64 "\n", stats->low_confidence);
print_histogram(out, "Trace length", stats->trace_length_hist);
print_histogram(out, "Trace run length", stats->trace_run_length_hist);