mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +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
@@ -205,13 +205,13 @@ static void annotate_browser__draw_current_jump(struct ui_browser *browser)
|
||||
|
||||
ui_browser__set_color(browser, HE_COLORSET_JUMP_ARROWS);
|
||||
__ui_browser__line_arrow(browser,
|
||||
pcnt_width + 2 + notes->widths.addr + width,
|
||||
pcnt_width + 2 + notes->src->widths.addr + width,
|
||||
from, to);
|
||||
|
||||
diff = is_fused(ab, cursor);
|
||||
if (diff > 0) {
|
||||
ui_browser__mark_fused(browser,
|
||||
pcnt_width + 3 + notes->widths.addr + width,
|
||||
pcnt_width + 3 + notes->src->widths.addr + width,
|
||||
from - diff, diff, to > from);
|
||||
}
|
||||
}
|
||||
@@ -983,7 +983,7 @@ int symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel,
|
||||
|
||||
ui_helpline__push("Press ESC to exit");
|
||||
|
||||
browser.b.width = notes->src->max_line_len;
|
||||
browser.b.width = notes->src->widths.max_line_len;
|
||||
browser.b.nr_entries = notes->src->nr_entries;
|
||||
browser.b.entries = ¬es->src->source,
|
||||
browser.b.width += 18; /* Percentage */
|
||||
|
||||
Reference in New Issue
Block a user