Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1396357

Re: [PATCH 5/8] perf tools: Promote proper messages for cross-platform unwind

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 5/8] perf tools: Promote proper messages for cross-platform unwind
Date Sat, 07 May 2016 21:50:01 +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>
X-Original-To He Kuang <hekuang@huawei.com>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.6.1 (2016-04-27)
X-Scanned-By MIMEDefang 2.68 on 10.5.11.26
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 58
Organization linux.* mail to news gateway
X-Original-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
X-Original-Date Sat, 7 May 2016 20:42:40 +0200
X-Original-Message-ID <20160507184240.GG19977@krava>
X-Original-References <1462525154-125656-1-git-send-email-hekuang@huawei.com> <1462525154-125656-6-git-send-email-hekuang@huawei.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1396357

Show key headers only | View raw


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


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