summaryrefslogtreecommitdiff
path: root/tools/perf/util/hist.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-08-02 08:29:56 +0200
committerIngo Molnar <mingo@elte.hu>2010-08-02 08:31:54 +0200
commit3772b734720e1a3f2dc1d95cfdfaa5332f4ccf01 (patch)
treea1a8cc85948c086aa12a1d8014151a7ca7c04ea8 /tools/perf/util/hist.c
parent9fc3af467d0749989518a23f7289a6f44e5cb214 (diff)
parent9fe6206f400646a2322096b56c59891d530e8d51 (diff)
Merge commit 'v2.6.35' into perf/core
Conflicts: tools/perf/Makefile tools/perf/util/hist.c Merge reason: Resolve the conflicts and update to latest upstream. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r--tools/perf/util/hist.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index d0f07f7bdf16..a6cea2894d12 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1050,13 +1050,17 @@ static int hist_entry__parse_objdump_line(struct hist_entry *self, FILE *file,
* Parse hexa addresses followed by ':'
*/
line_ip = strtoull(tmp, &tmp2, 16);
- if (*tmp2 != ':' || tmp == tmp2)
+ if (*tmp2 != ':' || tmp == tmp2 || tmp2[1] == '\0')
line_ip = -1;
}
if (line_ip != -1) {
- u64 start = map__rip_2objdump(self->ms.map, sym->start);
+ u64 start = map__rip_2objdump(self->ms.map, sym->start),
+ end = map__rip_2objdump(self->ms.map, sym->end);
+
offset = line_ip - start;
+ if (offset < 0 || (u64)line_ip > end)
+ offset = -1;
}
objdump_line = objdump_line__new(offset, line);