diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-02-03 13:52:00 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-04 03:33:24 -0500 |
commit | 9de89fe7c577847877ae00ea1aa6315559b10243 (patch) | |
tree | 523bcd2c2b1e2a839100b472ff864860cdc8caeb /tools/perf/util/event.c | |
parent | b8f46c5a34fa64fd456295388d18f50ae69d9f37 (diff) |
perf symbols: Remove perf_session usage in symbols layer
I noticed while writing the first test in 'perf regtest' that to
just test the symbol handling routines one needs to create a
perf session, that is a layer centered on a perf.data file,
events, etc, so I untied these layers.
This reduces the complexity for the users as the number of
parameters to most of the symbols and session APIs now was
reduced while not adding more state to all the map instances by
only having data that is needed to split the kernel (kallsyms
and ELF symtab sections) maps and do vmlinux relocation on the
main kernel map.
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: <1265223128-11786-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r-- | tools/perf/util/event.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index bbaee61c1683..c3831f633dec 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -374,9 +374,7 @@ int event__process_mmap(event_t *self, struct perf_session *session) | |||
374 | goto out_problem; | 374 | goto out_problem; |
375 | 375 | ||
376 | kernel->kernel = 1; | 376 | kernel->kernel = 1; |
377 | if (__map_groups__create_kernel_maps(&session->kmaps, | 377 | if (__perf_session__create_kernel_maps(session, kernel) < 0) |
378 | session->vmlinux_maps, | ||
379 | kernel) < 0) | ||
380 | goto out_problem; | 378 | goto out_problem; |
381 | 379 | ||
382 | session->vmlinux_maps[MAP__FUNCTION]->start = self->mmap.start; | 380 | session->vmlinux_maps[MAP__FUNCTION]->start = self->mmap.start; |
@@ -476,7 +474,7 @@ void thread__find_addr_location(struct thread *self, | |||
476 | { | 474 | { |
477 | thread__find_addr_map(self, session, cpumode, type, addr, al); | 475 | thread__find_addr_map(self, session, cpumode, type, addr, al); |
478 | if (al->map != NULL) | 476 | if (al->map != NULL) |
479 | al->sym = map__find_symbol(al->map, session, al->addr, filter); | 477 | al->sym = map__find_symbol(al->map, al->addr, filter); |
480 | else | 478 | else |
481 | al->sym = NULL; | 479 | al->sym = NULL; |
482 | } | 480 | } |