[PATCH v3 5/6] perf annotate: Make few functions static

From: Ravi Bangoria
Date: Mon Feb 03 2020 - 23:53:22 EST


These functions are not used outside of tools/perf/util/annotate.c.
Make them static.

Suggested-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Signed-off-by: Ravi Bangoria <ravi.bangoria@xxxxxxxxxxxxx>
---
tools/perf/util/annotate.c | 8 ++++----
tools/perf/util/annotate.h | 4 ----
2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 29029a5d59c7..bf7b5eefb990 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1057,7 +1057,7 @@ static void annotation__count_and_fill(struct annotation *notes, u64 start, u64
}
}

-void annotation__compute_ipc(struct annotation *notes, size_t size)
+static void annotation__compute_ipc(struct annotation *notes, size_t size)
{
s64 offset;

@@ -2583,7 +2583,7 @@ bool disasm_line__is_valid_local_jump(struct disasm_line *dl, struct symbol *sym
return true;
}

-void annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym)
+static void annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym)
{
u64 offset, size = symbol__size(sym);

@@ -2616,7 +2616,7 @@ void annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym)
}
}

-void annotation__set_offsets(struct annotation *notes, s64 size)
+static void annotation__set_offsets(struct annotation *notes, s64 size)
{
struct annotation_line *al;

@@ -2672,7 +2672,7 @@ static int annotation__max_ins_name(struct annotation *notes)
return max_name;
}

-void annotation__init_column_widths(struct annotation *notes, struct symbol *sym)
+static void annotation__init_column_widths(struct annotation *notes, struct symbol *sym)
{
notes->widths.addr = notes->widths.target =
notes->widths.min_addr = hex_width(symbol__size(sym));
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
index 75c58a759b96..3b6848c1d593 100644
--- a/tools/perf/util/annotate.h
+++ b/tools/perf/util/annotate.h
@@ -316,11 +316,7 @@ static inline bool annotation_line__filter(struct annotation_line *al, struct an
return notes->options->hide_src_code && al->offset == -1;
}

-void annotation__set_offsets(struct annotation *notes, s64 size);
-void annotation__compute_ipc(struct annotation *notes, size_t size);
-void annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym);
void annotation__update_column_widths(struct annotation *notes);
-void annotation__init_column_widths(struct annotation *notes, struct symbol *sym);

static inline struct sym_hist *annotated_source__histogram(struct annotated_source *src, int idx)
{
--
2.24.1