perf symbols: Move map related routines to map.c
Thru series of refactorings functions were being renamed but not moved to map.c to reduce patch noise, now lets have them in the same place so that use of the symbol system by tools can be constrained to building and linking fewer source files: symbol.c, map.c and rbtree.c. 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: <1269557941-15617-3-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
b177f63f52
commit
4b8cf84624
@ -544,32 +544,3 @@ int perf_session__set_kallsyms_ref_reloc_sym(struct perf_session *self,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u64 map__reloc_map_ip(struct map *map, u64 ip)
|
||||
{
|
||||
return ip + (s64)map->pgoff;
|
||||
}
|
||||
|
||||
static u64 map__reloc_unmap_ip(struct map *map, u64 ip)
|
||||
{
|
||||
return ip - (s64)map->pgoff;
|
||||
}
|
||||
|
||||
void map__reloc_vmlinux(struct map *self)
|
||||
{
|
||||
struct kmap *kmap = map__kmap(self);
|
||||
s64 reloc;
|
||||
|
||||
if (!kmap->ref_reloc_sym || !kmap->ref_reloc_sym->unrelocated_addr)
|
||||
return;
|
||||
|
||||
reloc = (kmap->ref_reloc_sym->unrelocated_addr -
|
||||
kmap->ref_reloc_sym->addr);
|
||||
|
||||
if (!reloc)
|
||||
return;
|
||||
|
||||
self->map_ip = map__reloc_map_ip;
|
||||
self->unmap_ip = map__reloc_unmap_ip;
|
||||
self->pgoff = reloc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user