mirror of
https://github.com/python/cpython.git
synced 2026-04-26 22:01:08 +00:00
gh-146073: Add fitness/exit quality mechanism for JIT trace frontend (GH-148089)
* Replaces ad-hoc logic for ending traces with a simple inequality: `fitness < exit_quality` * Fitness starts high and is reduced for branches, backward edges, calls and trace length * Exit quality reflect how good a spot that instruction is to end a trace. Closing a loop is very, specializable instructions are very low and the others in between.
This commit is contained in:
parent
448d7b96c1
commit
618b726d68
10 changed files with 205 additions and 45 deletions
|
|
@ -274,6 +274,7 @@ print_optimization_stats(FILE *out, OptimizationStats *stats)
|
|||
fprintf(out, "Optimization low confidence: %" PRIu64 "\n", stats->low_confidence);
|
||||
fprintf(out, "Optimization unknown callee: %" PRIu64 "\n", stats->unknown_callee);
|
||||
fprintf(out, "Executors invalidated: %" PRIu64 "\n", stats->executors_invalidated);
|
||||
fprintf(out, "Optimization fitness terminated: %" PRIu64 "\n", stats->fitness_terminated_traces);
|
||||
|
||||
print_histogram(out, "Trace length", stats->trace_length_hist);
|
||||
print_histogram(out, "Trace run length", stats->trace_run_length_hist);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue