From: acme@kernel.org (Arnaldo Carvalho de Melo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1] perf: cs-etm: Fix ETMv4 CONFIGR entry in perf.data file
Date: Fri, 21 Jul 2017 16:11:03 -0300 [thread overview]
Message-ID: <20170721191103.GR4134@kernel.org> (raw)
In-Reply-To: <20170721183740.GQ4134@kernel.org>
Em Fri, Jul 21, 2017 at 03:37:40PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Jul 21, 2017 at 03:35:33PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Jul 21, 2017 at 01:19:16PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Fri, Jul 21, 2017 at 08:50:09AM -0600, Mathieu Poirier escreveu:
> > > > On 12 July 2017 at 11:01, Mike Leach <mike.leach@linaro.org> wrote:
> > > > > The value passed into the perf.data file for the CONFIGR register in ETMv4
> > > > > was incorrectly being set to the command line options/ETMv3 value.
> > > > >
> > > > > info->priv[*offset + CS_ETMV4_TRCTRACEIDR] =
> > > > > coresight_get_trace_id(cpu);
> > > >
> > > > I have tested this patch on my side and things work as advertised now.
> > > >
> > > > Arnaldo, if you want to pick this up through your tree then:
> > > >
> > > > Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> > > >
> > > > Otherwise I'll get this, whatever you prefer.
> > >
> > > I'll get it, thanks for the ping,
> >
> > It is breaking the build in one of my containers, one with fedora 24 and
> > a android toolchain from http://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip
> >
> > arch/arm/util/cs-etm.c: In function 'cs_etmv4_get_config':^M
> > arch/arm/util/cs-etm.c:289:24: error: 'ETM_OPT_RETSTK' undeclared (first use in this function)^M
> > if (config_opts & BIT(ETM_OPT_RETSTK))
> >
> > It builds as
> >
> > NDK=/opt/android-ndk-r12b/
> > NDK_TOOLCHAIN=${NDK}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
> > NDK_SYSROOT=${NDK}/platforms/android-24/arch-arm
> > make -C /git/linux/tools/perf O=/tmp/build/perf WERROR=0 CFLAGS=${CFLAGS} ARCH=arm CROSS_COMPILE=${NDK_TOOLCHAIN} EXTRA_CFLAGS="-pie --sysroot=${NDK_SYSROOT}"
> > Ideas?
>
> Ok, it also fails on:
>
> 14 debian:experimental-x-arm64: FAIL
Ok, we need a definition for ETM_OPT_RETSTK, just like we have for the
other two...
Nuked it from my perf/core branch, please resubmit.
- Arnaldo
>
> Same problem:
>
> CC /tmp/build/perf/arch/arm64/util/../../arm/util/cs-etm.o
> CC /tmp/build/perf/util/config.o
> arch/arm64/util/../../arm/util/cs-etm.c: In function 'cs_etmv4_get_config':
> arch/arm64/util/../../arm/util/cs-etm.c:289:24: error: 'ETM_OPT_RETSTK' undeclared (first use in this function)
> if (config_opts & BIT(ETM_OPT_RETSTK))
> ^
> arch/arm64/util/../../arm/util/cs-etm.c:270:25: note: in definition of macro 'BIT'
> #define BIT(N) (1UL << (N))
> ^
> arch/arm64/util/../../arm/util/cs-etm.c:289:24: note: each undeclared identifier is reported only once for each function it appears in
> if (config_opts & BIT(ETM_OPT_RETSTK))
> ^
> arch/arm64/util/../../arm/util/cs-etm.c:270:25: note: in definition of macro 'BIT'
> #define BIT(N) (1UL << (N))
> ^
> mv: cannot stat '/tmp/build/perf/arch/arm64/util/../../arm/util/.cs-etm.o.tmp': No such file or directory
> /git/linux/tools/build/Makefile.build:101: recipe for target '/tmp/build/perf/arch/arm64/util/../../arm/util/cs-etm.o' failed
> make[6]: *** [/tmp/build/perf/arch/arm64/util/../../arm/util/cs-etm.o] Error 1
> /git/linux/tools/build/Makefile.build:144: recipe for target 'util' failed
> make[5]: *** [util] Error 2
> /git/linux/tools/build/Makefile.build:144: recipe for target 'arm64' failed
> make[4]: *** [arm64] Error 2
> /git/linux/tools/build/Makefile.build:144: recipe for target 'arch' failed
> make[3]: *** [arch] Error 2
> make[3]: *** Waiting for unfinished jobs....
> CC /tmp/build/perf/util/ctype.o
>
> Builds with:
>
> ARCH=arm64
> TARGET=aarch64-linux-gnu
> make ARCH=${ARCH} CROSS_COMPILE=${TARGET}- -C /git/linux/tools/perf O=/tmp/build/perf
>
> - Arnaldo
next prev parent reply other threads:[~2017-07-21 19:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 17:01 [PATCH v1] perf: cs-etm: Fix ETMv4 CONFIGR entry in perf.data file Mike Leach
2017-07-17 15:11 ` Mathieu Poirier
2017-07-21 14:50 ` Mathieu Poirier
2017-07-21 16:19 ` Arnaldo Carvalho de Melo
2017-07-21 18:35 ` Arnaldo Carvalho de Melo
2017-07-21 18:37 ` Arnaldo Carvalho de Melo
2017-07-21 19:11 ` Arnaldo Carvalho de Melo [this message]
2017-07-24 19:37 ` Mathieu Poirier
2017-08-01 16:17 ` Mathieu Poirier
2017-08-01 16:44 ` 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=20170721191103.GR4134@kernel.org \
--to=acme@kernel.org \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).