Commit a2db72c5 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarAdrian Hunter <adrian.hunter@intel.com>
Acked-by: default avatarIan 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent b08b20c3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -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);