aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/header.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r--tools/perf/util/header.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 942f7da8bf8..ec96321eb9e 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -193,7 +193,7 @@ static int write_padded(int fd, const void *bf, size_t count,
193 continue; \ 193 continue; \
194 else 194 else
195 195
196static int __dsos__write_buildid_table(struct list_head *head, int fd) 196static int __dsos__write_buildid_table(struct list_head *head, u16 misc, int fd)
197{ 197{
198 struct dso *pos; 198 struct dso *pos;
199 199
@@ -205,6 +205,7 @@ static int __dsos__write_buildid_table(struct list_head *head, int fd)
205 len = ALIGN(len, NAME_ALIGN); 205 len = ALIGN(len, NAME_ALIGN);
206 memset(&b, 0, sizeof(b)); 206 memset(&b, 0, sizeof(b));
207 memcpy(&b.build_id, pos->build_id, sizeof(pos->build_id)); 207 memcpy(&b.build_id, pos->build_id, sizeof(pos->build_id));
208 b.header.misc = misc;
208 b.header.size = sizeof(b) + len; 209 b.header.size = sizeof(b) + len;
209 err = do_write(fd, &b, sizeof(b)); 210 err = do_write(fd, &b, sizeof(b));
210 if (err < 0) 211 if (err < 0)
@@ -220,9 +221,11 @@ static int __dsos__write_buildid_table(struct list_head *head, int fd)
220 221
221static int dsos__write_buildid_table(int fd) 222static int dsos__write_buildid_table(int fd)
222{ 223{
223 int err = __dsos__write_buildid_table(&dsos__kernel, fd); 224 int err = __dsos__write_buildid_table(&dsos__kernel,
225 PERF_RECORD_MISC_KERNEL, fd);
224 if (err == 0) 226 if (err == 0)
225 err = __dsos__write_buildid_table(&dsos__user, fd); 227 err = __dsos__write_buildid_table(&dsos__user,
228 PERF_RECORD_MISC_USER, fd);
226 return err; 229 return err;
227} 230}
228 231