diff options
author | Namhyung Kim <namhyung@kernel.org> | 2023-12-13 01:13:11 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-12-24 02:39:42 +0100 |
commit | 0669729eb0afb0cf55fe1b97d7a8b1315354910f (patch) | |
tree | 32d651fab24e888618bc0d11abf691f3fb9e68ba /tools/perf/util/annotate.h | |
parent | perf annotate-data: Add dso->data_types tree (diff) | |
download | linux-0669729eb0afb0cf55fe1b97d7a8b1315354910f.tar.xz linux-0669729eb0afb0cf55fe1b97d7a8b1315354910f.zip |
perf annotate: Factor out evsel__get_arch()
The evsel__get_arch() is to get architecture info from the environment.
It'll be used by other places later so let's factor it out.
Also add arch__is() to check the arch info by name.
Committer notes:
"get" is usually associated with refcounting, so we better rename this
at some point to a better name.
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: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: linux-toolchains@vger.kernel.org
Cc: linux-trace-devel@vger.kernel.org
Link: https://lore.kernel.org/r/20231213001323.718046-6-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/annotate.h')
-rw-r--r-- | tools/perf/util/annotate.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h index 589f8aaf0236..2ef7e7dda7bd 100644 --- a/tools/perf/util/annotate.h +++ b/tools/perf/util/annotate.h @@ -61,6 +61,8 @@ struct ins_operands { struct arch; +bool arch__is(struct arch *arch, const char *name); + struct ins_ops { void (*free)(struct ins_operands *ops); int (*parse)(struct arch *arch, struct ins_operands *ops, struct map_symbol *ms); |