aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/header.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-11-27 16:29:14 -0200
committerIngo Molnar <mingo@elte.hu>2009-11-27 20:21:58 +0100
commitb0da954a4759ac19fb80a959e53b613fe376bc12 (patch)
treee3c43cc6a8aab3a148ab9e25d45ffcb390c55533 /tools/perf/util/header.c
parent61f37a824d6782503ff66bf653f2e07902b641a1 (diff)
perf symbols: Split the dsos list into kernel and user parts
We don't need to look at modules in dsos__findnew because the kernel events come only with user DSOs. Also we need a way to list just the module DSOs so that we can create multiple sets of maps, now that we will support maps for the variables in a symtab. 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: <1259346563-12568-3-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r--tools/perf/util/header.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 4b586569bb0..4805e6dfd23 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)
return 0;
}
-static int dsos__write_buildid_table(int fd)
+static int __dsos__write_buildid_table(struct list_head *head, int fd)
{
struct dso *pos;
- list_for_each_entry(pos, &dsos, node) {
+ list_for_each_entry(pos, head, node) {
int err;
struct build_id_event b;
size_t len;
@@ -212,6 +212,14 @@ static int dsos__write_buildid_table(int fd)
return 0;
}
+static int dsos__write_buildid_table(int fd)
+{
+ int err = __dsos__write_buildid_table(&dsos__kernel, fd);
+ if (err == 0)
+ err = __dsos__write_buildid_table(&dsos__user, fd);
+ return err;
+}
+
static int perf_header__adds_write(struct perf_header *self, int fd)
{
int nr_sections;