Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1396357
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 5/8] perf tools: Promote proper messages for cross-platform unwind |
| Date | 2016-05-07 21:50 +0200 |
| Message-ID | <rwgoF-7MA-1@gated-at.bofh.it> (permalink) |
| References | <rvJVM-2eU-17@gated-at.bofh.it> <rvJVM-2eU-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, May 06, 2016 at 08:59:11AM +0000, He Kuang wrote:
SNIP
> + if (machine)
> + root_dir = machine->root_dir;
> +
> + name = malloc(PATH_MAX);
> + if (!name)
> + return -1;
> +
> + kmod = dso->symtab_type == DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE ||
> + dso->symtab_type == DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE_COMP ||
> + dso->symtab_type == DSO_BINARY_TYPE__GUEST_KMODULE ||
> + dso->symtab_type == DSO_BINARY_TYPE__GUEST_KMODULE_COMP;
> +
> + /*
> + * Iterate over candidate debug images.
> + * Keep track of "interesting" ones (those which have a symtab, dynsym,
> + * and/or opd section) for processing.
> + */
> + for (i = 0; i < DSO_BINARY_TYPE__SYMTAB_CNT; i++) {
> + enum dso_binary_type symtab_type = binary_type_symtab[i];
> +
> + if (!dso__is_compatible_symtab_type(dso, kmod, symtab_type))
> + continue;
> +
> + if (dso__read_binary_type_filename(dso, symtab_type,
> + root_dir, name, PATH_MAX))
> + continue;
> +
> + if (!is_regular_file(name))
> + continue;
> +
> + return elf_is_64_bit(name);
> + }
> +
> + return -1;
> +}
> +
> int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)
> {
> char *name;
> diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
> index 4e6910e..d33fbf4 100644
> --- a/tools/perf/util/symbol.h
> +++ b/tools/perf/util/symbol.h
> @@ -308,6 +308,8 @@ int setup_list(struct strlist **list, const char *list_str,
> const char *list_name);
> int setup_intlist(struct intlist **list, const char *list_str,
> const char *list_name);
> +int elf_is_64_bit(char *name);
> +int dso_is_64_bit(struct dso *dso, struct map *map);
please put above 2 functions addition into separate patch
thanks,
jirka
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 5/8] perf tools: Promote proper messages for cross-platform unwind He Kuang <hekuang@huawei.com> - 2016-05-06 11:10 +0200 Re: [PATCH 5/8] perf tools: Promote proper messages for cross-platform unwind Jiri Olsa <jolsa@redhat.com> - 2016-05-07 20:50 +0200 Re: [PATCH 5/8] perf tools: Promote proper messages for cross-platform unwind Jiri Olsa <jolsa@redhat.com> - 2016-05-07 21:50 +0200
csiph-web