aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/vdso.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2014-07-22 09:17:57 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-07-23 16:36:32 -0400
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)
33 static const struct vdso_info vdso_info_init = { 33 static const struct vdso_info vdso_info_init = {
34 .vdso = { 34 .vdso = {
35 .temp_file_name = VDSO__TEMP_FILE_NAME, 35 .temp_file_name = VDSO__TEMP_FILE_NAME,
36 .dso_name = VDSO__MAP_NAME, 36 .dso_name = DSO__NAME_VDSO,
37 }, 37 },
38 }; 38 };
39 39
@@ -147,7 +147,7 @@ struct dso *vdso__dso_findnew(struct machine *machine)
147 if (!vdso_info) 147 if (!vdso_info)
148 return NULL; 148 return NULL;
149 149
150 dso = dsos__find(&machine->user_dsos, VDSO__MAP_NAME, true); 150 dso = dsos__find(&machine->user_dsos, DSO__NAME_VDSO, true);
151 if (!dso) { 151 if (!dso) {
152 char *file; 152 char *file;
153 153
@@ -155,8 +155,13 @@ struct dso *vdso__dso_findnew(struct machine *machine)
155 if (!file) 155 if (!file)
156 return NULL; 156 return NULL;
157 157
158 dso = vdso__new(machine, VDSO__MAP_NAME, file); 158 dso = vdso__new(machine, DSO__NAME_VDSO, file);
159 } 159 }
160 160
161 return dso; 161 return dso;
162} 162}
163
164bool dso__is_vdso(struct dso *dso)
165{
166 return !strcmp(dso->short_name, DSO__NAME_VDSO);
167}