perf annotate: Move 'max_jump_sources' struct to 'struct annotated_source'

It's only used in 'perf annotate' output which means functions with actual
samples.  No need to consume memory for every symbol ('struct annotation').

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240404175716.1225482-8-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Namhyung Kim
2024-04-04 10:57:14 -07:00
committed by Arnaldo Carvalho de Melo
parent a46acc4567
commit f6b18ababa
3 changed files with 7 additions and 5 deletions

View File

@@ -1373,8 +1373,8 @@ annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym)
if (target == NULL)
continue;
if (++target->jump_sources > notes->max_jump_sources)
notes->max_jump_sources = target->jump_sources;
if (++target->jump_sources > notes->src->max_jump_sources)
notes->src->max_jump_sources = target->jump_sources;
}
}
@@ -1432,7 +1432,7 @@ annotation__init_column_widths(struct annotation *notes, struct symbol *sym)
notes->src->widths.addr = notes->src->widths.target =
notes->src->widths.min_addr = hex_width(symbol__size(sym));
notes->src->widths.max_addr = hex_width(sym->end);
notes->src->widths.jumps = width_jumps(notes->max_jump_sources);
notes->src->widths.jumps = width_jumps(notes->src->max_jump_sources);
notes->src->widths.max_ins_name = annotation__max_ins_name(notes);
}