Commit cca32763 authored by Alejandro Piñeiro's avatar Alejandro Piñeiro

report: fix '-m inst' case

Right now if the string 'inst' is one of the measurements it is
replaced by 'instructions'. This was done because some drivers were
reporting it as 'inst' and others as 'instructions', and I guess that
also to make the final report easier to read.

But this causes using '-m inst' to fail, as 'instructions' is used to
fill the dictionary. As I found somewhat counterintuitive to assume
that the user should know about that replacement, this patch just adds
the same replacements on other parts of the code.

An alternative would be remove any 'inst' to 'instructions'
replacement, as now drivers output is more consistent. But again, it
is easier to read the report with 'instructions'.
Reviewed-by: Eric Anholt's avatarEric Anholt <>
parent ebe49201
......@@ -163,6 +163,10 @@ def main():
for m in args.measurements:
if m == "inst":
m = "instructions"
total_before[m] = 0
total_after[m] = 0
affected_before[m] = 0
......@@ -258,6 +262,10 @@ def main():
any_helped_or_hurt = False
for m in args.measurements:
if m == "inst":
m = "instructions"
if num_helped[m] > 0 or num_hurt[m] > 0:
any_helped_or_hurt = True
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment