diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-08-02 02:29:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-08-02 02:31:54 -0400 |
commit | 3772b734720e1a3f2dc1d95cfdfaa5332f4ccf01 (patch) | |
tree | a1a8cc85948c086aa12a1d8014151a7ca7c04ea8 /tools | |
parent | 9fc3af467d0749989518a23f7289a6f44e5cb214 (diff) | |
parent | 9fe6206f400646a2322096b56c59891d530e8d51 (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')
-rw-r--r-- | tools/perf/util/hist.c | 8 | ||||
-rw-r--r-- | tools/perf/util/symbol.c | 17 |
2 files changed, 16 insertions, 9 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); |
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 94cdf68440cd..3b8c00506672 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -1525,6 +1525,7 @@ static int map_groups__set_modules_path_dir(struct map_groups *self, | |||
1525 | { | 1525 | { |
1526 | struct dirent *dent; | 1526 | struct dirent *dent; |
1527 | DIR *dir = opendir(dir_name); | 1527 | DIR *dir = opendir(dir_name); |
1528 | int ret = 0; | ||
1528 | 1529 | ||
1529 | if (!dir) { | 1530 | if (!dir) { |
1530 | pr_debug("%s: cannot open %s dir\n", __func__, dir_name); | 1531 | pr_debug("%s: cannot open %s dir\n", __func__, dir_name); |
@@ -1547,8 +1548,9 @@ static int map_groups__set_modules_path_dir(struct map_groups *self, | |||
1547 | 1548 | ||
1548 | snprintf(path, sizeof(path), "%s/%s", | 1549 | snprintf(path, sizeof(path), "%s/%s", |
1549 | dir_name, dent->d_name); | 1550 | dir_name, dent->d_name); |
1550 | if (map_groups__set_modules_path_dir(self, path) < 0) | 1551 | ret = map_groups__set_modules_path_dir(self, path); |
1551 | goto failure; | 1552 | if (ret < 0) |
1553 | goto out; | ||
1552 | } else { | 1554 | } else { |
1553 | char *dot = strrchr(dent->d_name, '.'), | 1555 | char *dot = strrchr(dent->d_name, '.'), |
1554 | dso_name[PATH_MAX]; | 1556 | dso_name[PATH_MAX]; |
@@ -1569,18 +1571,19 @@ static int map_groups__set_modules_path_dir(struct map_groups *self, | |||
1569 | dir_name, dent->d_name); | 1571 | dir_name, dent->d_name); |
1570 | 1572 | ||
1571 | long_name = strdup(path); | 1573 | long_name = strdup(path); |
1572 | if (long_name == NULL) | 1574 | if (long_name == NULL) { |
1573 | goto failure; | 1575 | ret = -1; |
1576 | goto out; | ||
1577 | } | ||
1574 | dso__set_long_name(map->dso, long_name); | 1578 | dso__set_long_name(map->dso, long_name); |
1575 | map->dso->lname_alloc = 1; | 1579 | map->dso->lname_alloc = 1; |
1576 | dso__kernel_module_get_build_id(map->dso, ""); | 1580 | dso__kernel_module_get_build_id(map->dso, ""); |
1577 | } | 1581 | } |
1578 | } | 1582 | } |
1579 | 1583 | ||
1580 | return 0; | 1584 | out: |
1581 | failure: | ||
1582 | closedir(dir); | 1585 | closedir(dir); |
1583 | return -1; | 1586 | return ret; |
1584 | } | 1587 | } |
1585 | 1588 | ||
1586 | static char *get_kernel_version(const char *root_dir) | 1589 | static char *get_kernel_version(const char *root_dir) |