summaryrefslogtreecommitdiff
path: root/tools/perf/util/vdso.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2014-07-22 16:17:57 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-07-23 17:36:32 -0300
commit51682dc744c3db89e515ac47a4c1f7003fd81d20 (patch)
treec87e787e53ed3593c03149aa524465ae6cbf034f /tools/perf/util/vdso.c
parent4f71f2a0abe8b2a76669a4608a62f5020a64205a (diff)
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 <jolsa@redhat.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1406035081-14301-49-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/vdso.c')
-rw-r--r--tools/perf/util/vdso.c11
1 files changed, 8 insertions, 3 deletions
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);
+}