Skip to content

Commit eba8523

Browse files
committed
perf symbols: Fix map->end fixup
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]>
1 parent 4955ea2 commit eba8523

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/util/symbol.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ void __map_groups__fixup_end(struct map_groups *mg, enum map_type type)
207207
for (nd = rb_next(prevnd); nd; nd = rb_next(nd)) {
208208
prev = curr;
209209
curr = rb_entry(nd, struct map, rb_node);
210-
prev->end = curr->start - 1;
210+
prev->end = curr->start;
211211
}
212212

213213
/*

0 commit comments

Comments
 (0)