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>
This commit is contained in:
Arnaldo Carvalho de Melo
2010-02-03 16:52:00 -02:00
committed by Ingo Molnar
parent b8f46c5a34
commit 9de89fe7c5
11 changed files with 149 additions and 121 deletions

View File

@@ -374,9 +374,7 @@ int event__process_mmap(event_t *self, struct perf_session *session)
goto out_problem;
kernel->kernel = 1;
if (__map_groups__create_kernel_maps(&session->kmaps,
session->vmlinux_maps,
kernel) < 0)
if (__perf_session__create_kernel_maps(session, kernel) < 0)
goto out_problem;
session->vmlinux_maps[MAP__FUNCTION]->start = self->mmap.start;
@@ -476,7 +474,7 @@ void thread__find_addr_location(struct thread *self,
{
thread__find_addr_map(self, session, cpumode, type, addr, al);
if (al->map != NULL)
al->sym = map__find_symbol(al->map, session, al->addr, filter);
al->sym = map__find_symbol(al->map, al->addr, filter);
else
al->sym = NULL;
}