From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/6] perf thread-stack: Hide x86 retpolines
Date: Fri, 22 Feb 2019 17:53:33 -0300 [thread overview]
Message-ID: <20190222205333.GG26132@kernel.org> (raw)
In-Reply-To: <20190222194244.GF26132@kernel.org>
Em Fri, Feb 22, 2019 at 04:42:44PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Wed, Jan 09, 2019 at 11:18:35AM +0200, Adrian Hunter escreveu:
> > +static int thread_stack__x86_retpoline(struct thread_stack *ts,
> > + struct perf_sample *sample,
> > + struct addr_location *to_al)
> > +{
> > + struct thread_stack_entry *tse = &ts->stack[ts->cnt - 1];
> > + struct call_path_root *cpr = ts->crp->cpr;
> > + struct symbol *sym = tse->cp->sym;
> > + struct symbol *tsym = to_al->sym;
> > + struct call_path *cp;
> > +
> > + if (sym && sym->name && is_x86_retpoline(sym->name)) {
>
>
> CC /tmp/build/perf/util/scripting-engines/trace-event-perl.o
> CC /tmp/build/perf/util/intel-pt.o
> CC /tmp/build/perf/util/intel-pt-decoder/intel-pt-log.o
> util/thread-stack.c:780:18: error: address of array 'sym->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
> if (sym && sym->name && is_x86_retpoline(sym->name)) {
> ~~ ~~~~~^~~~
> 1 error generated.
> mv: cannot stat '/tmp/build/perf/util/.thread-stack.o.tmp': No such file or directory
> make[4]: *** [/git/linux/tools/build/Makefile.build:96: /tmp/build/perf/util/thread-stack.o] Error 1
>
>
> [acme@quaco perf]$ pahole -C symbol ~/bin/perf
> struct symbol {
> struct rb_node rb_node; /* 0 24 */
> u64 start; /* 24 8 */
> u64 end; /* 32 8 */
> u16 namelen; /* 40 2 */
> u8 type:4; /* 42: 4 1 */
> u8 binding:4; /* 42: 0 1 */
> u8 idle:1; /* 43: 7 1 */
> u8 ignore:1; /* 43: 6 1 */
> u8 inlined:1; /* 43: 5 1 */
>
> /* XXX 5 bits hole, try to pack */
>
> u8 arch_sym; /* 44 1 */
> _Bool annotate2; /* 45 1 */
> char name[0]; /* 46 0 */
>
> /* size: 48, cachelines: 1, members: 12 */
> /* bit holes: 1, sum bit holes: 5 bits */
> /* padding: 2 */
> /* last cacheline: 48 bytes */
> };
> [acme@quaco perf]$
>
> I'm removing that sym->name test.
For completeness sake, this was one of the compilers where this failed:
clang version 7.0.1 (Fedora 7.0.1-2.fc30)
The systems where it broke:
18 debian:9 : FAIL
19 debian:experimental : FAIL
29 fedora:25 : FAIL
30 fedora:26 : FAIL
31 fedora:27 : FAIL
32 fedora:28 : FAIL
33 fedora:29 : FAIL
34 fedora:30 : FAIL
35 fedora:rawhide : FAIL
45 opensuse:tumbleweed : FAIL
51 ubuntu:16.04 : FAIL
58 ubuntu:17.10 : FAIL
59 ubuntu:18.04 : FAIL
70 ubuntu:18.10 : FAIL
71 ubuntu:19.04 : FAIL
- Arnaldo
next prev parent reply other threads:[~2019-02-22 20:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-09 9:18 [PATCH 0/6] perf thread-stack: x86 retpolines Adrian Hunter
2019-01-09 9:18 ` [PATCH 1/6] perf tools: Fix split_kallsyms_for_kcore for trampoline symbols Adrian Hunter
2019-02-09 12:57 ` [tip:perf/core] perf tools: Fix split_kallsyms_for_kcore() " tip-bot for Adrian Hunter
2019-01-09 9:18 ` [PATCH 2/6] perf thread-stack: Tidy thread_stack__push_cp() usage Adrian Hunter
2019-02-09 12:58 ` [tip:perf/core] " tip-bot for Adrian Hunter
2019-01-09 9:18 ` [PATCH 3/6] perf thread-stack: Tidy thread_stack__no_call_return() by adding more local variables Adrian Hunter
2019-02-09 12:58 ` [tip:perf/core] " tip-bot for Adrian Hunter
2019-01-09 9:18 ` [PATCH 4/6] perf thread-stack: Represent jmps to the start of a different symbol Adrian Hunter
2019-02-06 12:39 ` Arnaldo Carvalho de Melo
2019-02-06 13:25 ` Adrian Hunter
2019-02-09 12:59 ` [tip:perf/core] " tip-bot for Adrian Hunter
2019-01-09 9:18 ` [PATCH 5/6] perf thread-stack: Improve thread_stack__no_call_return() Adrian Hunter
2019-02-22 9:48 ` Adrian Hunter
2019-02-22 14:39 ` Arnaldo Carvalho de Melo
2019-02-28 7:49 ` [tip:perf/core] " tip-bot for Adrian Hunter
2019-01-09 9:18 ` [PATCH 6/6] perf thread-stack: Hide x86 retpolines Adrian Hunter
2019-01-09 15:38 ` Jiri Olsa
2019-01-10 7:52 ` Adrian Hunter
2019-02-22 19:42 ` Arnaldo Carvalho de Melo
2019-02-22 20:53 ` Arnaldo Carvalho de Melo [this message]
2019-02-28 7:49 ` [tip:perf/core] " tip-bot for Adrian Hunter
2019-01-10 9:55 ` [PATCH 0/6] perf thread-stack: " Jiri Olsa
2019-02-06 9:10 ` Adrian Hunter
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=20190222205333.GG26132@kernel.org \
--to=arnaldo.melo@gmail.com \
--cc=adrian.hunter@intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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.