diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-11-27 13:29:14 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-27 14:21:58 -0500 |
commit | b0da954a4759ac19fb80a959e53b613fe376bc12 (patch) | |
tree | e3c43cc6a8aab3a148ab9e25d45ffcb390c55533 /tools/perf/util/header.c | |
parent | 61f37a824d6782503ff66bf653f2e07902b641a1 (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.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; |