From 51682dc744c3db89e515ac47a4c1f7003fd81d20 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Tue, 22 Jul 2014 16:17:57 +0300 Subject: perf tools: Separate the VDSO map name from the VDSO dso name This is in preparation for supporting 32-bit compatibility VDSOs. Reviewed-by: Jiri Olsa Signed-off-by: Adrian Hunter Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1406035081-14301-49-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/vdso.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tools/perf/util/vdso.c') diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c index 946d927765c6..a9300f83654b 100644 --- a/tools/perf/util/vdso.c +++ b/tools/perf/util/vdso.c @@ -33,7 +33,7 @@ static struct vdso_info *vdso_info__new(void) static const struct vdso_info vdso_info_init = { .vdso = { .temp_file_name = VDSO__TEMP_FILE_NAME, - .dso_name = VDSO__MAP_NAME, + .dso_name = DSO__NAME_VDSO, }, }; @@ -147,7 +147,7 @@ struct dso *vdso__dso_findnew(struct machine *machine) if (!vdso_info) return NULL; - dso = dsos__find(&machine->user_dsos, VDSO__MAP_NAME, true); + dso = dsos__find(&machine->user_dsos, DSO__NAME_VDSO, true); if (!dso) { char *file; @@ -155,8 +155,13 @@ struct dso *vdso__dso_findnew(struct machine *machine) if (!file) return NULL; - dso = vdso__new(machine, VDSO__MAP_NAME, file); + dso = vdso__new(machine, DSO__NAME_VDSO, file); } return dso; } + +bool dso__is_vdso(struct dso *dso) +{ + return !strcmp(dso->short_name, DSO__NAME_VDSO); +} -- cgit v1.2.3-70-g09d2