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>
This commit is contained in:
Arnaldo Carvalho de Melo
2009-11-27 16:29:14 -02:00
committed by Ingo Molnar
parent 61f37a824d
commit b0da954a47
3 changed files with 48 additions and 22 deletions

View File

@@ -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;