diff options
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r-- | tools/perf/util/header.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 4b586569bb02..4805e6dfd23c 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c | |||
@@ -185,11 +185,11 @@ static int do_write(int fd, const void *buf, size_t size) | |||
185 | return 0; | 185 | return 0; |
186 | } | 186 | } |
187 | 187 | ||
188 | static int dsos__write_buildid_table(int fd) | 188 | static int __dsos__write_buildid_table(struct list_head *head, int fd) |
189 | { | 189 | { |
190 | struct dso *pos; | 190 | struct dso *pos; |
191 | 191 | ||
192 | list_for_each_entry(pos, &dsos, node) { | 192 | list_for_each_entry(pos, head, node) { |
193 | int err; | 193 | int err; |
194 | struct build_id_event b; | 194 | struct build_id_event b; |
195 | size_t len; | 195 | size_t len; |
@@ -212,6 +212,14 @@ static int dsos__write_buildid_table(int fd) | |||
212 | return 0; | 212 | return 0; |
213 | } | 213 | } |
214 | 214 | ||
215 | static int dsos__write_buildid_table(int fd) | ||
216 | { | ||
217 | int err = __dsos__write_buildid_table(&dsos__kernel, fd); | ||
218 | if (err == 0) | ||
219 | err = __dsos__write_buildid_table(&dsos__user, fd); | ||
220 | return err; | ||
221 | } | ||
222 | |||
215 | static int perf_header__adds_write(struct perf_header *self, int fd) | 223 | static int perf_header__adds_write(struct perf_header *self, int fd) |
216 | { | 224 | { |
217 | int nr_sections; | 225 | int nr_sections; |