diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-01-07 16:59:39 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-01-13 04:09:16 -0500 |
commit | a89e5abe3efcc7facc666d3985769278937f86b0 (patch) | |
tree | 4aa271d7d1d751ff842bb23874fcb91b384343cc /tools/perf/util/session.c | |
parent | fed5af61dc0d9402d26e7fb8fb9731a60a8e05ca (diff) |
perf symbols: Record the domain of DSOs in HEADER_BUILD_ID header table
So that we can restore them to the right DSO list (either
dsos__kernel or dsos__user).
We do that just like the kernel does for the other events,
encoding PERF_RECORD_MISC_{KERNEL,USER} in perf_event_header.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1262901583-8074-2-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index e0e6a075489e..378ac5422bcf 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -255,6 +255,7 @@ int perf_header__read_build_ids(int input, u64 offset, u64 size) | |||
255 | while (offset < limit) { | 255 | while (offset < limit) { |
256 | struct dso *dso; | 256 | struct dso *dso; |
257 | ssize_t len; | 257 | ssize_t len; |
258 | struct list_head *head = &dsos__user; | ||
258 | 259 | ||
259 | if (read(input, &bev, sizeof(bev)) != sizeof(bev)) | 260 | if (read(input, &bev, sizeof(bev)) != sizeof(bev)) |
260 | goto out; | 261 | goto out; |
@@ -263,7 +264,10 @@ int perf_header__read_build_ids(int input, u64 offset, u64 size) | |||
263 | if (read(input, filename, len) != len) | 264 | if (read(input, filename, len) != len) |
264 | goto out; | 265 | goto out; |
265 | 266 | ||
266 | dso = dsos__findnew(filename); | 267 | if (bev.header.misc & PERF_RECORD_MISC_KERNEL) |
268 | head = &dsos__kernel; | ||
269 | |||
270 | dso = __dsos__findnew(head, filename); | ||
267 | if (dso != NULL) | 271 | if (dso != NULL) |
268 | dso__set_build_id(dso, &bev.build_id); | 272 | dso__set_build_id(dso, &bev.build_id); |
269 | 273 | ||