diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2023-01-20 14:34:50 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-01-22 18:10:12 -0300 |
commit | a2db72c5dac4c9bc1e577a82602639619264409f (patch) | |
tree | ea58bb60b6c1da08dfccdfffa5b4e3e8f73be9e8 | |
parent | b08b20c3098832a4ffc22222ab742179b1f8514b (diff) | |
download | linux-a2db72c5dac4c9bc1e577a82602639619264409f.tar.gz linux-a2db72c5dac4c9bc1e577a82602639619264409f.tar.bz2 linux-a2db72c5dac4c9bc1e577a82602639619264409f.zip |
perf symbols: Add dso__find_symbol_nocache()
Symbols should not be cached when there are more symbols still to add.
Add dso__find_symbol_nocache() to facilitate that.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20230120123456.12449-5-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/util/symbol.c | 5 | ||||
-rw-r--r-- | tools/perf/util/symbol.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index a3a165ae933a..a024f06f75d8 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -556,6 +556,11 @@ struct symbol *dso__find_symbol(struct dso *dso, u64 addr) return dso->last_find_result.symbol; } +struct symbol *dso__find_symbol_nocache(struct dso *dso, u64 addr) +{ + return symbols__find(&dso->symbols, addr); +} + struct symbol *dso__first_symbol(struct dso *dso) { return symbols__first(&dso->symbols); diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index f735108c4d4e..2fdeb22bd02f 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h @@ -148,6 +148,7 @@ void dso__delete_symbol(struct dso *dso, struct symbol *sym); struct symbol *dso__find_symbol(struct dso *dso, u64 addr); +struct symbol *dso__find_symbol_nocache(struct dso *dso, u64 addr); struct symbol *dso__find_symbol_by_name(struct dso *dso, const char *name); struct symbol *symbol__next_by_name(struct symbol *sym); |