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>
This commit is contained in:
Adrian Hunter 2023-01-20 14:34:50 +02:00 committed by Arnaldo Carvalho de Melo
parent b08b20c309
commit a2db72c5da
2 changed files with 6 additions and 0 deletions

View file

@ -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);

View file

@ -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);