aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-08-02 02:29:56 -0400
committerIngo Molnar <mingo@elte.hu>2010-08-02 02:31:54 -0400
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,
1050 * Parse hexa addresses followed by ':' 1050 * Parse hexa addresses followed by ':'
1051 */ 1051 */
1052 line_ip = strtoull(tmp, &tmp2, 16); 1052 line_ip = strtoull(tmp, &tmp2, 16);
1053 if (*tmp2 != ':' || tmp == tmp2) 1053 if (*tmp2 != ':' || tmp == tmp2 || tmp2[1] == '\0')
1054 line_ip = -1; 1054 line_ip = -1;
1055 } 1055 }
1056 1056
1057 if (line_ip != -1) { 1057 if (line_ip != -1) {
1058 u64 start = map__rip_2objdump(self->ms.map, sym->start); 1058 u64 start = map__rip_2objdump(self->ms.map, sym->start),
1059 end = map__rip_2objdump(self->ms.map, sym->end);
1060
1059 offset = line_ip - start; 1061 offset = line_ip - start;
1062 if (offset < 0 || (u64)line_ip > end)
1063 offset = -1;
1060 } 1064 }
1061 1065
1062 objdump_line = objdump_line__new(offset, line); 1066 objdump_line = objdump_line__new(offset, line);