aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
authorNamhyung Kim <[email protected]>2024-04-04 17:57:14 +0000
committerArnaldo Carvalho de Melo <[email protected]>2024-04-08 20:43:20 +0000
commitf6b18ababa5ea8d7f798aa452eae83058fd09c59 (patch)
tree5dd214a4f6043d63a27820e182d3b63fdfc490d7 /tools/perf/util/annotate.c
parentperf annotate: Move 'widths' struct to 'struct annotated_source' (diff)
downloadkernel-f6b18ababa5ea8d7f798aa452eae83058fd09c59.tar.gz
kernel-f6b18ababa5ea8d7f798aa452eae83058fd09c59.zip
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 <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r--tools/perf/util/annotate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 0be744bb529c..1fd51856d78f 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -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);
}