Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf annotate: Remove remaining usages of local annotation options

So that it can get rid of the unused data.

Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20231128175441.721579-8-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Namhyung Kim and committed by
Arnaldo Carvalho de Melo
2fa21d69 7f929aea

+10 -12
+6 -8
tools/perf/ui/browsers/annotate.c
··· 37 37 return symbol__annotation(ms->sym); 38 38 } 39 39 40 - static bool disasm_line__filter(struct ui_browser *browser, void *entry) 40 + static bool disasm_line__filter(struct ui_browser *browser __maybe_unused, void *entry) 41 41 { 42 - struct annotation *notes = browser__annotation(browser); 43 42 struct annotation_line *al = list_entry(entry, struct annotation_line, node); 44 - return annotation_line__filter(al, notes); 43 + return annotation_line__filter(al); 45 44 } 46 45 47 46 static int ui_browser__jumps_percent_color(struct ui_browser *browser, int nr, bool current) ··· 268 269 static void annotate_browser__set_top(struct annotate_browser *browser, 269 270 struct annotation_line *pos, u32 idx) 270 271 { 271 - struct annotation *notes = browser__annotation(&browser->b); 272 272 unsigned back; 273 273 274 274 ui_browser__refresh_dimensions(&browser->b); ··· 277 279 while (browser->b.top_idx != 0 && back != 0) { 278 280 pos = list_entry(pos->node.prev, struct annotation_line, node); 279 281 280 - if (annotation_line__filter(pos, notes)) 282 + if (annotation_line__filter(pos)) 281 283 continue; 282 284 283 285 --browser->b.top_idx; ··· 496 498 list_for_each_entry(pos, &notes->src->source, al.node) { 497 499 if (pos->al.offset == offset) 498 500 return pos; 499 - if (!annotation_line__filter(&pos->al, notes)) 501 + if (!annotation_line__filter(&pos->al)) 500 502 ++*idx; 501 503 } 502 504 ··· 540 542 541 543 *idx = browser->b.index; 542 544 list_for_each_entry_continue(al, &notes->src->source, node) { 543 - if (annotation_line__filter(al, notes)) 545 + if (annotation_line__filter(al)) 544 546 continue; 545 547 546 548 ++*idx; ··· 577 579 578 580 *idx = browser->b.index; 579 581 list_for_each_entry_continue_reverse(al, &notes->src->source, node) { 580 - if (annotation_line__filter(al, notes)) 582 + if (annotation_line__filter(al)) 581 583 continue; 582 584 583 585 --*idx;
+1 -1
tools/perf/util/annotate.c
··· 2727 2727 struct annotation_line *al; 2728 2728 2729 2729 list_for_each_entry(al, &notes->src->source, node) { 2730 - if (annotation_line__filter(al, notes)) 2730 + if (annotation_line__filter(al)) 2731 2731 continue; 2732 2732 annotation_line__write(al, notes, &wops); 2733 2733 fputc('\n', fp);
+3 -3
tools/perf/util/annotate.h
··· 320 320 321 321 static inline int annotation__cycles_width(struct annotation *notes) 322 322 { 323 - if (notes->branch && notes->options->show_minmax_cycle) 323 + if (notes->branch && annotate_opts.show_minmax_cycle) 324 324 return ANNOTATION__IPC_WIDTH + ANNOTATION__MINMAX_CYCLES_WIDTH; 325 325 326 326 return notes->branch ? ANNOTATION__IPC_WIDTH + ANNOTATION__CYCLES_WIDTH : 0; ··· 331 331 return (symbol_conf.show_total_period ? 12 : 7) * notes->nr_events; 332 332 } 333 333 334 - static inline bool annotation_line__filter(struct annotation_line *al, struct annotation *notes) 334 + static inline bool annotation_line__filter(struct annotation_line *al) 335 335 { 336 - return notes->options->hide_src_code && al->offset == -1; 336 + return annotate_opts.hide_src_code && al->offset == -1; 337 337 } 338 338 339 339 void annotation__set_offsets(struct annotation *notes, s64 size);