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/perf/util/symbol.c | |
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/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 17 |
1 files changed, 10 insertions, 7 deletions
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) |