Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bc1e5d60 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf annotate TUI: Clarify calculation of column header widths

In commit f8f4aaea ("perf annotate: Finally display IPC and cycle
accounting") the 'pcnt_width' variable was abused in a few places to
also include the optional width of the "IPC" and "cycles" columns, while
in other places we stopped using 'pcnt_width' and instead its previous
equation...

Now that we need to tap into annotate_browser__pcnt_width() to consider
if --show-total-period is being used and instead of that hardcoded 7
(strlen("Percent")) we need to use it or strlen("Event count") we need
this properly clarified to avoid having to touch all the (7 * nr_events)
places.

Clarify this by introducing a separate annotate_browser__cycles_width()
to leave the pcnt_width calculate just what its name implies.

Cc: Taeung Song <treeze.taeung@gmail.com>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/n/tip-szgb07t4k5wtvks8nzwkg710@git.kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 29dc267f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment