diff --git a/Tools/scripts/summarize_stats.py b/Tools/scripts/summarize_stats.py index 5793e5c649d6b3..501c848182518f 100644 --- a/Tools/scripts/summarize_stats.py +++ b/Tools/scripts/summarize_stats.py @@ -45,6 +45,7 @@ TOTAL = "specialization.hit", "specialization.miss", "execution_count" +UOPS_EXECUTED_LABEL = "Uops executed" def pretty(name: str) -> str: @@ -442,7 +443,7 @@ def get_gc_stats(self) -> list[dict[str, int]]: gc_stats[gen_n][name] = value return gc_stats - def get_optimization_stats(self) -> dict[str, tuple[int, int | None]]: + def get_optimization_stats(self) -> dict[Doc, tuple[int, int | None]]: if "Optimization attempts" not in self._data: return {} @@ -507,7 +508,7 @@ def get_optimization_stats(self) -> dict[str, tuple[int, int | None]]: None, ), Doc( - "Uops executed", + UOPS_EXECUTED_LABEL, "The total number of uops (micro-operations) that were executed", ): ( uops, @@ -1143,11 +1144,11 @@ def calc_optimization_table(stats: Stats) -> Rows: return [ ( - label, + doc, Count(value), - Ratio(value, den, percentage=label != "Uops executed"), + Ratio(value, den, percentage=doc.text != UOPS_EXECUTED_LABEL), ) - for label, (value, den) in optimization_stats.items() + for doc, (value, den) in optimization_stats.items() ] def calc_optimizer_table(stats: Stats) -> Rows: