aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-03-25 18:58:58 -0400
committerIngo Molnar <mingo@elte.hu>2010-03-26 03:52:58 -0400
commit4b8cf84624e9a58a21aaac3d064222092ae234e0 (patch)
treeb3730987728f9280612fedbf24db50142e8ed253 /tools/perf/util/session.c
parentb177f63f5226e75280855bbcd106e677250778bd (diff)
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>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r--tools/perf/util/session.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 2cef3730cd99..76b4ac689df9 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -544,32 +544,3 @@ int perf_session__set_kallsyms_ref_reloc_sym(struct perf_session *self,
544 544
545 return 0; 545 return 0;
546} 546}
547
548static u64 map__reloc_map_ip(struct map *map, u64 ip)
549{
550 return ip + (s64)map->pgoff;
551}
552
553static u64 map__reloc_unmap_ip(struct map *map, u64 ip)
554{
555 return ip - (s64)map->pgoff;
556}
557
558void map__reloc_vmlinux(struct map *self)
559{
560 struct kmap *kmap = map__kmap(self);
561 s64 reloc;
562
563 if (!kmap->ref_reloc_sym || !kmap->ref_reloc_sym->unrelocated_addr)
564 return;
565
566 reloc = (kmap->ref_reloc_sym->unrelocated_addr -
567 kmap->ref_reloc_sym->addr);
568
569 if (!reloc)
570 return;
571
572 self->map_ip = map__reloc_map_ip;
573 self->unmap_ip = map__reloc_unmap_ip;
574 self->pgoff = reloc;
575}