diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-10-30 14:28:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-02 10:52:11 -0500 |
commit | afb7b4f08e274cecd8337f9444affa288a9cd4c1 (patch) | |
tree | a78e90d009d06b28113d9b6d1f01c8a6d7735d42 /tools/perf/util/symbol.c | |
parent | 3ed67776fc23061180896086a206a02be649dd26 (diff) |
perf tools: Factor out the map initialization
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <1256927305-4628-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 0273d83f728f..13677b5dbe5e 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -1132,18 +1132,12 @@ static struct map *map__new2(u64 start, struct dso *dso) | |||
1132 | struct map *self = malloc(sizeof(*self)); | 1132 | struct map *self = malloc(sizeof(*self)); |
1133 | 1133 | ||
1134 | if (self != NULL) { | 1134 | if (self != NULL) { |
1135 | self->start = start; | ||
1136 | /* | 1135 | /* |
1137 | * Will be filled after we load all the symbols | 1136 | * ->end will be filled after we load all the symbols |
1138 | */ | 1137 | */ |
1139 | self->end = 0; | 1138 | map__init(self, start, 0, 0, dso); |
1140 | |||
1141 | self->pgoff = 0; | ||
1142 | self->dso = dso; | ||
1143 | self->map_ip = map__map_ip; | ||
1144 | self->unmap_ip = map__unmap_ip; | ||
1145 | RB_CLEAR_NODE(&self->rb_node); | ||
1146 | } | 1139 | } |
1140 | |||
1147 | return self; | 1141 | return self; |
1148 | } | 1142 | } |
1149 | 1143 | ||