mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-15 22:41:38 +00:00
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 <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-7-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
cee9b86043
commit
a46acc4567
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user