aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.h
diff options
context:
space:
mode:
authorNamhyung Kim <[email protected]>2024-04-04 17:57:13 +0000
committerArnaldo Carvalho de Melo <[email protected]>2024-04-08 20:43:20 +0000
commita46acc45673bc5537b0d9fc77b7a4edb5d068de6 (patch)
tree132ab6c1225fd763987f938abda432424bbbbdbe /tools/perf/util/annotate.h
parentperf annotate: Get rid of offsets array (diff)
downloadkernel-a46acc45673bc5537b0d9fc77b7a4edb5d068de6.tar.gz
kernel-a46acc45673bc5537b0d9fc77b7a4edb5d068de6.zip
perf annotate: Move 'widths' 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'). Also move the 'max_line_len' field into it as it's related. 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.h')
-rw-r--r--tools/perf/util/annotate.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
index d61184499bda..402ae774426b 100644
--- a/tools/perf/util/annotate.h
+++ b/tools/perf/util/annotate.h
@@ -250,7 +250,7 @@ struct cyc_hist {
* @nr_entries: Number of annotated_line in the source list.
* @nr_asm_entries: Number of annotated_line with actual asm instruction in the
* source list.
- * @max_line_len: Maximum length of objdump output in an annotated_line.
+ * @widths: Precalculated width of each column in the TUI output.
*
* disasm_lines are allocated, percentages calculated and all sorted by percentage
* when the annotation is about to be presented, so the percentages are for
@@ -265,7 +265,15 @@ struct annotated_source {
int nr_histograms;
int nr_entries;
int nr_asm_entries;
- u16 max_line_len;
+ struct {
+ u8 addr;
+ u8 jumps;
+ u8 target;
+ u8 min_addr;
+ u8 max_addr;
+ u8 max_ins_name;
+ u16 max_line_len;
+ } widths;
};
struct annotation_line *annotated_source__get_line(struct annotated_source *src,
@@ -302,14 +310,6 @@ struct LOCKABLE annotation {
u64 start;
int nr_events;
int max_jump_sources;
- struct {
- u8 addr;
- u8 jumps;
- u8 target;
- u8 min_addr;
- u8 max_addr;
- u8 max_ins_name;
- } widths;
struct annotated_source *src;
struct annotated_branch *branch;
};