[PATCH v2 13/18] perf vdso: Constify dso parameter in dso__is_vdso()
From: Ian Rogers
Date: Tue Oct 27 2026 - 19:16:42 EST
dso__can_shrink_symbols(const struct dso *dso) needs to query
dso__is_vdso(dso) on a const struct dso pointer to exclude vDSO images
from symbol shrinking.
Change the parameter of dso__is_vdso() from 'struct dso *' to
'const struct dso *'.
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/util/vdso.c | 2 +-
tools/perf/util/vdso.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c
index c12f5d8c4bf6..7f2dde70f3e4 100644
--- a/tools/perf/util/vdso.c
+++ b/tools/perf/util/vdso.c
@@ -361,7 +361,7 @@ struct dso *machine__findnew_vdso(struct machine *machine,
return __machine__addnew_vdso(machine, DSO__NAME_VDSO, file);
}
-bool dso__is_vdso(struct dso *dso)
+bool dso__is_vdso(const struct dso *dso)
{
return !strcmp(dso__short_name(dso), DSO__NAME_VDSO) ||
!strcmp(dso__short_name(dso), DSO__NAME_VDSO32) ||
diff --git a/tools/perf/util/vdso.h b/tools/perf/util/vdso.h
index bc74ace603ae..b6e05bc2d9f3 100644
--- a/tools/perf/util/vdso.h
+++ b/tools/perf/util/vdso.h
@@ -19,7 +19,7 @@ static inline bool is_vdso_map(const char *filename)
struct dso;
-bool dso__is_vdso(struct dso *dso);
+bool dso__is_vdso(const struct dso *dso);
struct machine;
struct thread;
--
2.56.0.313.g2479322e68-goog