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 disasm: Make ins__scnprintf() and ins__is_nop() static

Reduce the scope of ins__scnprintf() and ins__is_nop() that aren't used
outside of disasm.c.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Athira Rajeev <atrajeev@linux.ibm.com>
Cc: Bill Wendling <morbo@google.com>
Cc: Charlie Jenkins <charlie@rivosinc.com>
Cc: Collin Funk <collin.funk1@gmail.com>
Cc: Dmitriy Vyukov <dvyukov@google.com>
Cc: Dr. David Alan Gilbert <linux@treblig.org>
Cc: Eric Biggers <ebiggers@kernel.org>
Cc: Haibo Xu <haibo1.xu@intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Justin Stitt <justinstitt@google.com>
Cc: Li Huafei <lihuafei1@huawei.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <nick.desaulniers+lkml@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <song@kernel.org>
Cc: Stephen Brennan <stephen.s.brennan@oracle.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Ian Rogers and committed by
Arnaldo Carvalho de Melo
fa770f1a bca75320

+3 -6
+3 -3
tools/perf/util/disasm.c
··· 247 247 return scnprintf(bf, size, "%-*s %s", max_ins_name, ins->name, ops->raw); 248 248 } 249 249 250 - int ins__scnprintf(struct ins *ins, char *bf, size_t size, 251 - struct ins_operands *ops, int max_ins_name) 250 + static int ins__scnprintf(struct ins *ins, char *bf, size_t size, 251 + struct ins_operands *ops, int max_ins_name) 252 252 { 253 253 if (ins->ops->scnprintf) 254 254 return ins->ops->scnprintf(ins, bf, size, ops, max_ins_name); ··· 828 828 .scnprintf = ins__raw_scnprintf, 829 829 }; 830 830 831 - bool ins__is_nop(const struct ins *ins) 831 + static bool ins__is_nop(const struct ins *ins) 832 832 { 833 833 return ins->ops == &nop_ops; 834 834 }
-3
tools/perf/util/disasm.h
··· 110 110 bool arch__is(struct arch *arch, const char *name); 111 111 112 112 struct ins_ops *ins__find(struct arch *arch, const char *name, struct disasm_line *dl); 113 - int ins__scnprintf(struct ins *ins, char *bf, size_t size, 114 - struct ins_operands *ops, int max_ins_name); 115 113 116 114 bool ins__is_call(const struct ins *ins); 117 115 bool ins__is_jump(const struct ins *ins); 118 116 bool ins__is_fused(struct arch *arch, const char *ins1, const char *ins2); 119 - bool ins__is_nop(const struct ins *ins); 120 117 bool ins__is_ret(const struct ins *ins); 121 118 bool ins__is_lock(const struct ins *ins); 122 119