perf symbols: Fix map->end fixup
authorArnaldo Carvalho de Melo <[email protected]>
Tue, 14 Oct 2014 19:39:27 +0000 (16:39 -0300)
committerArnaldo Carvalho de Melo <[email protected]>
Tue, 14 Oct 2014 20:50:57 +0000 (17:50 -0300)
When synthesizing maps from files that have incomplete symbol
information, like kallsyms, we need to fixup the end of maps by seting
its end from the ->start of the next map, fix it to set prev_map->end to
curr_map->start, since ->end is the first byte outside prev_map address
range.

Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/symbol.c

index be84f7a9838bff705d9c02b49168aede82b4291c..c787a43d529a181cb79e90bf67ed5bf7e268d7e9 100644 (file)
@@ -207,7 +207,7 @@ void __map_groups__fixup_end(struct map_groups *mg, enum map_type type)
        for (nd = rb_next(prevnd); nd; nd = rb_next(nd)) {
                prev = curr;
                curr = rb_entry(nd, struct map, rb_node);
-               prev->end = curr->start - 1;
+               prev->end = curr->start;
        }
 
        /*