cpacfstats: add counter numbers to output

This adds the counter numbers to the corresponding counter names to the
cpacfstats output. This aims to ease using this tool with other related
tools which may use other names for the counters.

Signed-off-by: Finn Callies <fcallies@linux.ibm.com>
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Finn Callies
2024-04-11 09:57:09 +02:00
committed by Jan Höppner
parent a95dc09c6e
commit 1655c39ded

View File

@@ -226,7 +226,8 @@ static void print_virtual_counter_answer(int s,
if (paictr > MAX_NUM_PAI)
eprint("Pai counter number too big: %d\n", paictr);
else if (!paiprintnonzero || paivalue > 0)
printf(" %-45s: %lu\n", get_ctr_name(paictr), paivalue);
printf(" (%3d) %-45s: %lu\n", paictr + 1,
get_ctr_name(paictr), paivalue);
}
}