From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: suzuki.poulose@arm.com, peterz@infradead.org,
linux-kernel@vger.kernel.org, mingo@redhat.com, jolsa@redhat.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] perf tools: Add proper header file for symbols
Date: Mon, 11 Feb 2019 11:22:20 -0300 [thread overview]
Message-ID: <20190211142220.GC3269@kernel.org> (raw)
In-Reply-To: <20190211114603.GA3269@kernel.org>
Em Mon, Feb 11, 2019 at 08:46:03AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 08, 2019 at 03:35:43PM -0700, Mathieu Poirier escreveu:
> > After 'commit e22c1c751140 ("perf thread: Don't include symbol.h,
> > symbol_conf.h is enough")'
> >
> > Compilation of the perf tools is broken when using the functionality
> > provided by the openCSD library:
> >
> > [...]
> >
> > ... timerfd: [ on ]
> > ... sched_getcpu: [ on ]
> > ... sdt: [ OFF ]
> > ... setns: [ on ]
> > ... libopencsd: [ on ]
> >
> > [...]
> >
> > CC util/arm-spe.o
> > CC util/arm-spe-pkt-decoder.o
> > CC util/s390-cpumsf.o
> > CC util/cs-etm.o
> > CC util/parse-branch-options.o
> > util/cs-etm.c: In function ‘cs_etm__mem_access’:
> > util/cs-etm.c:297:24: error: storage size of ‘al’ isn’t known
> > struct addr_location al;
> >
> > And rightly so since file cs-etm.c doesn't include symbol.h, something
> > that is rectified in this patch.
>
> Thanks, I'll make sure the openCSD library is present in one of my
> containers doing arm64 cross builds so that this gets caught in the
> future.
So, without your patch:
17.52 ubuntu:19.04-x-arm64 : FAIL gcc (Ubuntu 8.2.0-19ubuntu1) 8.2.0
CC /tmp/build/perf/util/parse-branch-options.o
util/cs-etm.c: In function 'cs_etm__mem_access':
util/cs-etm.c:326:24: error: storage size of 'al' isn't known
struct addr_location al;
^~
util/cs-etm.c:326:24: error: unused variable 'al' [-Werror=unused-variable]
util/cs-etm.c: In function 'cs_etm__alloc_queue':
util/cs-etm.c:384:22: error: invalid application of 'sizeof' to incomplete type 'struct branch_stack'
size_t sz = sizeof(struct branch_stack);
^~~~~~
util/cs-etm.c:387:16: error: invalid application of 'sizeof' to incomplete type 'struct branch_entry'
sizeof(struct branch_entry);
^~~~~~
util/cs-etm.c: In function 'cs_etm__copy_last_branch_rb':
util/cs-etm.c:541:8: error: dereferencing pointer to incomplete type 'struct branch_stack'
bs_dst->nr = bs_src->nr;
^~
util/cs-etm.c:557:16: error: invalid application of 'sizeof' to incomplete type 'struct branch_entry'
sizeof(struct branch_entry) * nr);
^~~~~~
util/cs-etm.c:569:17: error: invalid application of 'sizeof' to incomplete type 'struct branch_entry'
sizeof(struct branch_entry) * etmq->last_branch_pos);
^~~~~~
util/cs-etm.c: In function 'cs_etm__update_last_branch_rb':
util/cs-etm.c:646:4: error: dereferencing pointer to incomplete type 'struct branch_entry'
be->from = cs_etm__last_executed_instr(etmq->prev_packet);
^~
CC /tmp/build/perf/util/dump-insn.o
util/cs-etm.c: In function 'cs_etm__synth_branch_sample':
util/cs-etm.c:792:23: error: field 'entries' has incomplete type
struct branch_entry entries;
^~~~~~~
util/cs-etm.c:820:5: error: field name not in record or union initializer
.from = sample.ip,
^
util/cs-etm.c:820:5: note: (near initialization for '(anonymous).entries')
util/cs-etm.c:821:5: error: field name not in record or union initializer
.to = sample.addr,
^
util/cs-etm.c:821:5: note: (near initialization for '(anonymous).entries')
cc1: all warnings being treated as errors
mv: cannot stat '/tmp/build/perf/util/.cs-etm.o.tmp': No such file or directory
make[4]: *** [/git/linux/tools/build/Makefile.build:97: /tmp/build/perf/util/cs-etm.o] Error 1
----------------------------------------------------
After your patch:
[root@quaco x-arm64]# time dm ubuntu:19.04-x-arm64
1 44.59 ubuntu:19.04-x-arm64 : Ok gcc (Ubuntu 8.2.0-19ubuntu1) 8.2.0
further output below, but now I have this in this ubuntu 19.04 arm64
cross build container:
[root@quaco x-arm64]# egrep -B2 -A2 'CSD|CROSS' Dockerfile
ENV ARCH arm64
ENV TARGET aarch64-linux-gnu
ENV CROSS_COMPILE=${TARGET}-
RUN apt-get -y update && \
apt-get -y install make gcc-${TARGET} g++-${TARGET} flex bison git && \
--
export PATH=$INSTALLDIR/bin:$PATH && \
export TARGETMACH=${TARGET} && \
export CROSS=${TARGET}- && \
export CC=${CROSS}gcc && \
export LD=${CROSS}ld && \
export AS=${CROSS}as && \
wget -q http://zlib.net/zlib-${ZLIB_VER}.tar.gz && \
wget -q https://fedorahosted.org/releases/e/l/elfutils/${ELFUTILS_VER}/elfutils-${ELFUTILS_VER}.tar.bz2 && \
--
cd .. && \
rm -rf elfutils-${ELFUTILS_VER} && \
git clone https://github.com/Linaro/OpenCSD.git && \
make -C OpenCSD/decoder/build/linux/ CROSS_COMPILE=${CROSS} install && \
rm -rf OpenCSD && \
apt-get -y remove wget bzip2 && \
apt-get -y clean && \
rm -rf /usr/share/doc /usr/share/gtk-doc /usr/share/locale /usr/share/man && \
unset TARGET INSTALLDIR TARGETMACH CROSS CC LD AS
RUN mkdir -m 777 -p /git /tmp/build/perf /tmp/build/objtool /tmp/build/linux && \
groupadd -r perfbuilder && \
[root@quaco x-arm64]#
[root@quaco x-arm64]# grep -B3 -A3 cs-etm /tmp/dm.log/ubuntu\:19.04-x-arm64
LINK /tmp/build/perf/plugin_hrtimer.so
CC /tmp/build/perf/arch/arm64/util/../../arm/util/auxtrace.o
LINK /tmp/build/perf/plugin_kmem.so
CC /tmp/build/perf/arch/arm64/util/../../arm/util/cs-etm.o
LINK /tmp/build/perf/plugin_kvm.so
CC /tmp/build/perf/libbpf_errno.o
LINK /tmp/build/perf/plugin_mac80211.so
--
MKDIR /tmp/build/perf/util/intel-pt-decoder/
GEN /tmp/build/perf/util/intel-pt-decoder/inat-tables.c
CC /tmp/build/perf/util/intel-pt-decoder/intel-pt-log.o
MKDIR /tmp/build/perf/util/cs-etm-decoder/
CC /tmp/build/perf/util/cs-etm-decoder/cs-etm-decoder.o
CC /tmp/build/perf/tests/hists_output.o
CC /tmp/build/perf/util/intel-pt-decoder/intel-pt-decoder.o
CC /tmp/build/perf/tests/hists_cumulate.o
CC /tmp/build/perf/util/intel-pt-decoder/intel-pt-insn-decoder.o
CC /tmp/build/perf/tests/python-use.o
LD /tmp/build/perf/util/cs-etm-decoder/libperf-in.o
MKDIR /tmp/build/perf/util/scripting-engines/
LD /tmp/build/perf/util/scripting-engines/libperf-in.o
CC /tmp/build/perf/tests/bp_signal.o
--
CC /tmp/build/perf/util/s390-cpumsf.o
CC /tmp/build/perf/tests/code-reading.o
CC /tmp/build/perf/tests/sample-parsing.o
CC /tmp/build/perf/util/cs-etm.o
CC /tmp/build/perf/tests/parse-no-sample-id-all.o
CC /tmp/build/perf/util/parse-branch-options.o
CC /tmp/build/perf/tests/kmod-path.o
--
CC /tmp/build/perf/trace/beauty/statx.o
CC /tmp/build/perf/arch/arm64/util/../../arm/util/auxtrace.o
CC /tmp/build/perf/ui/util.o
CC /tmp/build/perf/arch/arm64/util/../../arm/util/cs-etm.o
CC /tmp/build/perf/ui/hist.o
CC /tmp/build/perf/ui/stdio/hist.o
LD /tmp/build/perf/trace/beauty/libperf-in.o
--
CC /tmp/build/perf/util/thread-stack.o
CC /tmp/build/perf/util/auxtrace.o
CC /tmp/build/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.o
CC /tmp/build/perf/util/cs-etm-decoder/cs-etm-decoder.o
CC /tmp/build/perf/util/intel-pt.o
CC /tmp/build/perf/util/intel-bts.o
CC /tmp/build/perf/tests/python-use.o
CC /tmp/build/perf/util/intel-pt-decoder/intel-pt-log.o
CC /tmp/build/perf/tests/bp_signal.o
LD /tmp/build/perf/util/cs-etm-decoder/libperf-in.o
CC /tmp/build/perf/util/arm-spe.o
CC /tmp/build/perf/util/intel-pt-decoder/intel-pt-decoder.o
CC /tmp/build/perf/tests/bp_signal_overflow.o
--
CC /tmp/build/perf/tests/bp_account.o
CC /tmp/build/perf/tests/wp.o
CC /tmp/build/perf/util/s390-cpumsf.o
CC /tmp/build/perf/util/cs-etm.o
CC /tmp/build/perf/util/parse-branch-options.o
CC /tmp/build/perf/tests/task-exit.o
CC /tmp/build/perf/tests/sw-clock.o
[root@quaco x-arm64]#
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2019-02-11 14:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-08 22:35 [PATCH] perf tools: Add proper header file for symbols Mathieu Poirier
2019-02-11 11:46 ` Arnaldo Carvalho de Melo
2019-02-11 14:22 ` Arnaldo Carvalho de Melo [this message]
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=20190211142220.GC3269@kernel.org \
--to=acme@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=suzuki.poulose@arm.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 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).