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: Staticize some local functions

I found annotation__mark_jump_targets(), annotation__set_offsets()
and annotation__init_column_widths() are only used in the same file.
Let's make them static.

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-3-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Namhyung Kim and committed by
Arnaldo Carvalho de Melo
bfd98ceb aaf494cf

+5 -6
+5 -3
tools/perf/util/annotate.c
··· 1316 1316 return true; 1317 1317 } 1318 1318 1319 - void annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym) 1319 + static void 1320 + annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym) 1320 1321 { 1321 1322 u64 offset, size = symbol__size(sym); 1322 1323 ··· 1348 1347 } 1349 1348 } 1350 1349 1351 - void annotation__set_offsets(struct annotation *notes, s64 size) 1350 + static void annotation__set_offsets(struct annotation *notes, s64 size) 1352 1351 { 1353 1352 struct annotation_line *al; 1354 1353 struct annotated_source *src = notes->src; ··· 1405 1404 return max_name; 1406 1405 } 1407 1406 1408 - void annotation__init_column_widths(struct annotation *notes, struct symbol *sym) 1407 + static void 1408 + annotation__init_column_widths(struct annotation *notes, struct symbol *sym) 1409 1409 { 1410 1410 notes->widths.addr = notes->widths.target = 1411 1411 notes->widths.min_addr = hex_width(symbol__size(sym));
-3
tools/perf/util/annotate.h
··· 340 340 return annotate_opts.hide_src_code && al->offset == -1; 341 341 } 342 342 343 - void annotation__set_offsets(struct annotation *notes, s64 size); 344 - void annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym); 345 343 void annotation__update_column_widths(struct annotation *notes); 346 - void annotation__init_column_widths(struct annotation *notes, struct symbol *sym); 347 344 void annotation__toggle_full_addr(struct annotation *notes, struct map_symbol *ms); 348 345 349 346 static inline struct sym_hist *annotated_source__histogram(struct annotated_source *src, int idx)