]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - tools/perf/util/hist.c
Merge commit 'v2.6.35' into perf/core
[net-next-2.6.git] / tools / perf / util / hist.c
index d0f07f7bdf16bd2fb8d161b031c586b0b97c968d..a6cea2894d12a5261519ebf40ce4af83787dce98 100644 (file)
@@ -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);