All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ben Hutchings <ben@decadent.org.uk>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Wang Nan <wangnan0@huawei.com>, He Kuang <hekuang@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>,
	Kaixu Xia <xiakaixu@huawei.com>, Zefan Li <lizefan@huawei.com>
Subject: Re: [PATCH perf 3/4] perf tools: Fix unused variables: x86_{32,64}_regoffset_table
Date: Wed, 20 Jan 2016 10:59:24 -0300	[thread overview]
Message-ID: <20160120135924.GR27085@kernel.org> (raw)
In-Reply-To: <20160119213306.GE2637@decadent.org.uk>

Em Tue, Jan 19, 2016 at 09:33:06PM +0000, Ben Hutchings escreveu:
> gcc 5 doesn't seem to care about these, but gcc 6 does and that
> results in a build failure.

Ben, please CC the people on the CC list for the patch that introduces
the problem, Wang, He, can I have your Acked-by?

- Arnaldo
 
> Fixes: bbbe6bf6037d ("perf tools: Introduce regs_query_register_offset() ...")
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
>  tools/perf/arch/x86/util/dwarf-regs.c | 38 ++++++++++++++++-------------------
>  1 file changed, 17 insertions(+), 21 deletions(-)
> 
> diff --git a/tools/perf/arch/x86/util/dwarf-regs.c b/tools/perf/arch/x86/util/dwarf-regs.c
> index 9223c16..fe1e516 100644
> --- a/tools/perf/arch/x86/util/dwarf-regs.c
> +++ b/tools/perf/arch/x86/util/dwarf-regs.c
> @@ -55,26 +55,10 @@ struct pt_regs_offset {
>  
>  #define REG_OFFSET_END {.name = NULL, .offset = 0}
>  
> +/* TODO: switching by dwarf address size */
>  #ifdef __x86_64__
> -# define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
> -# define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = -1}
> -#else
> -# define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = -1}
> -# define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
> -#endif
> -
> -static const struct pt_regs_offset x86_32_regoffset_table[] = {
> -	REG_OFFSET_NAME_32("%ax",	eax),
> -	REG_OFFSET_NAME_32("%cx",	ecx),
> -	REG_OFFSET_NAME_32("%dx",	edx),
> -	REG_OFFSET_NAME_32("%bx",	ebx),
> -	REG_OFFSET_NAME_32("$stack",	esp),	/* Stack address instead of %sp */
> -	REG_OFFSET_NAME_32("%bp",	ebp),
> -	REG_OFFSET_NAME_32("%si",	esi),
> -	REG_OFFSET_NAME_32("%di",	edi),
> -	REG_OFFSET_END,
> -};
>  
> +#define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
>  static const struct pt_regs_offset x86_64_regoffset_table[] = {
>  	REG_OFFSET_NAME_64("%ax",	rax),
>  	REG_OFFSET_NAME_64("%dx",	rdx),
> @@ -94,12 +78,24 @@ static const struct pt_regs_offset x86_64_regoffset_table[] = {
>  	REG_OFFSET_NAME_64("%r15",	r15),
>  	REG_OFFSET_END,
>  };
> -
> -/* TODO: switching by dwarf address size */
> -#ifdef __x86_64__
>  #define regoffset_table x86_64_regoffset_table
> +
>  #else
> +
> +#define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
> +static const struct pt_regs_offset x86_32_regoffset_table[] = {
> +	REG_OFFSET_NAME_32("%ax",	eax),
> +	REG_OFFSET_NAME_32("%cx",	ecx),
> +	REG_OFFSET_NAME_32("%dx",	edx),
> +	REG_OFFSET_NAME_32("%bx",	ebx),
> +	REG_OFFSET_NAME_32("$stack",	esp),	/* Stack address instead of %sp */
> +	REG_OFFSET_NAME_32("%bp",	ebp),
> +	REG_OFFSET_NAME_32("%si",	esi),
> +	REG_OFFSET_NAME_32("%di",	edi),
> +	REG_OFFSET_END,
> +};
>  #define regoffset_table x86_32_regoffset_table
> +
>  #endif
>  
>  /* Minus 1 for the ending REG_OFFSET_END */
> 

  reply	other threads:[~2016-01-20 13:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19 21:32 [PATCH perf 0/4] Build fixes for gcc 6 Ben Hutchings
2016-01-19 21:32 ` [PATCH perf 1/4] perf tools: Fix wrong indentation and build failure with " Ben Hutchings
2016-01-19 21:32 ` [PATCH perf 2/4] perf top: Fix behaviour of Shift-Tab in annotated view with nothing focussed Ben Hutchings
2016-01-19 21:33 ` [PATCH perf 3/4] perf tools: Fix unused variables: x86_{32,64}_regoffset_table Ben Hutchings
2016-01-20 13:59   ` Arnaldo Carvalho de Melo [this message]
2016-01-21  4:43     ` Wangnan (F)
2016-01-21 15:38       ` Arnaldo Carvalho de Melo
2016-01-21 15:41         ` Arnaldo Carvalho de Melo
2016-01-22  1:26           ` Wangnan (F)
2016-01-22  5:56       ` 平松雅巳 / HIRAMATU,MASAMI
2016-01-22  6:19         ` Wangnan (F)
2016-01-22  7:59           ` 平松雅巳 / HIRAMATU,MASAMI
2016-01-19 21:33 ` [PATCH perf 4/4] perf tests: Delete mis-indented dead code that causes build failure with gcc 6 Ben Hutchings
2016-01-19 21:40 ` [PATCH perf 0/4] Build fixes for " Markus Trippelsdorf
2016-01-19 21:58   ` Ben Hutchings
2016-01-19 22:00     ` Markus Trippelsdorf
2016-01-19 22:04       ` Ben Hutchings
2016-01-19 22:28       ` Arnaldo Carvalho de Melo
2016-01-19 22:30         ` Arnaldo Carvalho de Melo
2016-01-19 22:43           ` Markus Trippelsdorf
2016-01-19 22:31         ` Markus Trippelsdorf
2016-01-20 13:20           ` 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=20160120135924.GR27085@kernel.org \
    --to=acme@kernel.org \
    --cc=ben@decadent.org.uk \
    --cc=hekuang@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=wangnan0@huawei.com \
    --cc=xiakaixu@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.