All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: He Kuang <hekuang@huawei.com>
Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
	alexander.shishkin@linux.intel.com, wangnan0@huawei.com,
	jpoimboe@redhat.com, ak@linux.intel.com, eranian@google.com,
	namhyung@kernel.org, adrian.hunter@intel.com,
	sukadev@linux.vnet.ibm.com, masami.hiramatsu.pt@hitachi.com,
	tumanova@linux.vnet.ibm.com, kan.liang@intel.com,
	penberg@kernel.org, dsahern@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/8] perf tools: Promote proper messages for cross-platform unwind
Date: Sat, 7 May 2016 20:42:40 +0200	[thread overview]
Message-ID: <20160507184240.GG19977@krava> (raw)
In-Reply-To: <1462525154-125656-6-git-send-email-hekuang@huawei.com>

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

  parent reply	other threads:[~2016-05-07 19:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06  8:59 [PATCH 0/8] Add support for remote unwind He Kuang
2016-05-06  8:59 ` [PATCH 1/8] perf tools: Omit DWARF judgement when recording dwarf callchain He Kuang
2016-05-06 11:47   ` Arnaldo Carvalho de Melo
2016-05-07 18:03   ` Jiri Olsa
2016-05-09 16:16     ` Arnaldo Carvalho de Melo
2016-05-10  1:44       ` Hekuang
2016-05-10 20:30   ` [tip:perf/core] perf callchain: Recording 'dwarf' callchains do not need DWARF unwinding support tip-bot for He Kuang
2016-05-06  8:59 ` [PATCH 2/8] perf script: Add options for custom vdso name He Kuang
2016-05-06 11:49   ` Arnaldo Carvalho de Melo
2016-05-07 18:14   ` Jiri Olsa
2016-05-06  8:59 ` [PATCH 3/8] perf build: Add build-test for libunwind cross-platforms support He Kuang
2016-05-07 18:20   ` Jiri Olsa
2016-05-06  8:59 ` [PATCH 4/8] perf build: Add build-test for debug-frame on arm/arm64 He Kuang
2016-05-07 18:24   ` Jiri Olsa
2016-05-06  8:59 ` [PATCH 5/8] perf tools: Promote proper messages for cross-platform unwind He Kuang
2016-05-07 18:41   ` Jiri Olsa
2016-05-07 18:42   ` Jiri Olsa [this message]
2016-05-06  8:59 ` [PATCH 6/8] perf callchain: Add support " He Kuang
2016-05-06 11:56   ` Arnaldo Carvalho de Melo
2016-05-06  8:59 ` [PATCH 7/8] perf callchain: Support x86 target platform He Kuang
2016-05-06  8:59 ` [PATCH 8/8] perf callchain: Support aarch64 cross-platform He Kuang
2016-05-06 11:58 ` [PATCH 0/8] Add support for remote unwind Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160507184240.GG19977@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=hekuang@huawei.com \
    --cc=jpoimboe@redhat.com \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=penberg@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sukadev@linux.vnet.ibm.com \
    --cc=tumanova@linux.vnet.ibm.com \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.