diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/vdso.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c index fdaccaf67371..946d927765c6 100644 --- a/tools/perf/util/vdso.c +++ b/tools/perf/util/vdso.c | |||
@@ -121,6 +121,20 @@ void vdso__exit(struct machine *machine) | |||
121 | zfree(&machine->vdso_info); | 121 | zfree(&machine->vdso_info); |
122 | } | 122 | } |
123 | 123 | ||
124 | static struct dso *vdso__new(struct machine *machine, const char *short_name, | ||
125 | const char *long_name) | ||
126 | { | ||
127 | struct dso *dso; | ||
128 | |||
129 | dso = dso__new(short_name); | ||
130 | if (dso != NULL) { | ||
131 | dsos__add(&machine->user_dsos, dso); | ||
132 | dso__set_long_name(dso, long_name, false); | ||
133 | } | ||
134 | |||
135 | return dso; | ||
136 | } | ||
137 | |||
124 | struct dso *vdso__dso_findnew(struct machine *machine) | 138 | struct dso *vdso__dso_findnew(struct machine *machine) |
125 | { | 139 | { |
126 | struct vdso_info *vdso_info; | 140 | struct vdso_info *vdso_info; |
@@ -141,11 +155,7 @@ struct dso *vdso__dso_findnew(struct machine *machine) | |||
141 | if (!file) | 155 | if (!file) |
142 | return NULL; | 156 | return NULL; |
143 | 157 | ||
144 | dso = dso__new(VDSO__MAP_NAME); | 158 | dso = vdso__new(machine, VDSO__MAP_NAME, file); |
145 | if (dso != NULL) { | ||
146 | dsos__add(&machine->user_dsos, dso); | ||
147 | dso__set_long_name(dso, file, false); | ||
148 | } | ||
149 | } | 159 | } |
150 | 160 | ||
151 | return dso; | 161 | return dso; |