perf annotate: Move update_column_widths() to the generic lib
Previous patch left it where it was to ease review, move it to its right place. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-ikdjr014p7k5kachgyjrgiey@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -2084,6 +2084,19 @@ void annotation__set_offsets(struct annotation *notes, s64 size)
|
||||
}
|
||||
}
|
||||
|
||||
void annotation__update_column_widths(struct annotation *notes)
|
||||
{
|
||||
if (notes->options->use_offset)
|
||||
notes->widths.target = notes->widths.min_addr;
|
||||
else
|
||||
notes->widths.target = notes->widths.max_addr;
|
||||
|
||||
notes->widths.addr = notes->widths.target;
|
||||
|
||||
if (notes->options->show_nr_jumps)
|
||||
notes->widths.addr += notes->widths.jumps + 1;
|
||||
}
|
||||
|
||||
static void annotation__calc_lines(struct annotation *notes, struct map *map,
|
||||
struct rb_root *root, u64 start)
|
||||
{
|
||||
|
Reference in New Issue
Block a user