From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Michael Petlan <mpetlan@redhat.com>
Subject: Re: [PATCH 00/12] libperf: Add events to perf/event.h
Date: Mon, 26 Aug 2019 13:06:27 -0300 [thread overview]
Message-ID: <20190826160627.GE24801@kernel.org> (raw)
In-Reply-To: <20190825181752.722-1-jolsa@kernel.org>
Em Sun, Aug 25, 2019 at 08:17:40PM +0200, Jiri Olsa escreveu:
> hi,
> as a preparation for sampling libperf interface, moving event
> definitions into the library header. Moving just the kernel
> non-AUX events now.
>
> In order to keep libperf simple, we switch 'u64/u32/u16/u8'
> types used events to their generic '__u*' versions.
>
> Perf added 'u*' types mainly to ease up printing __u64 values
> as stated in the linux/types.h comment:
>
> /*
> * We define u64 as uint64_t for every architecture
> * so that we can print it with "%"PRIx64 without getting warnings.
> *
> * typedef __u64 u64;
> * typedef __s64 s64;
> */
>
> Adding and using new PRI_lu64 and PRI_lx64 macros to be used for
> that. Using extra '_' to ease up the reading and differentiate
> them from standard PRI*64 macros.
So, this is not building on android env:
builtin-sched.c: In function 'process_lost':
builtin-sched.c:2646:2: error: unknown conversion type character 'l' in format [-Werror=format=]
printf("lost %" PRI_lu64 " events on cpu %d\n", event->lost.lost, sample->cpu);
^
builtin-sched.c:2646:2: error: format '%d' expects argument of type 'int', but argument 2 has type '__u64' [-Werror=format=]
builtin-sched.c:2646:2: error: too many arguments for format [-Werror=format-extra-args]
MKDIR /tmp/build/perf/util/
[perfbuilder@490c2c7bdaab ~]$ /opt/android-ndk-r12b//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -v
Using built-in specs.
COLLECT_GCC=/opt/android-ndk-r12b//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
COLLECT_LTO_WRAPPER=/opt/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../libexec/gcc/arm-linux-androideabi/4.9.x/lto-wrapper
Target: arm-linux-androideabi
Configured with: /usr/local/google/buildbot/src/android/gcc/toolchain/build/../gcc/gcc-4.9/configure --prefix=/tmp/59719db9ae19ff43aef46bbcb79596b6 --target=arm-linux-androideabi --host=x86_64-linux-gnu --build=x86_64-linux-gnu --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/buildbot/tmp/build/toolchain/temp-install --with-mpfr=/buildbot/tmp/build/toolchain/temp-install --with-mpc=/buildbot/tmp/build/toolchain/temp-install --with-cloog=/buildbot/tmp/build/toolchain/temp-install --with-isl=/buildbot/tmp/build/toolchain/temp-install --with-ppl=/buildbot/tmp/build/toolchain/temp-install --disable-ppl-version-check --disable-cloog-version-check --disable-isl-version-check --enable-cloog-backend=isl --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-shared --disable-tls --disable-libitm --with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace --enable-bionic-libs --enable-libatomic-ifuncs=no --enable-initfini-array --disable-nls --prefix=/tmp/59719db9ae19ff43aef46bbcb79596b6 --with-sysroot=/tmp/59719db9ae19ff43aef46bbcb79596b6/sysroot --with-binutils-version=2.25 --with-mpfr-version=3.1.1 --with-mpc-version=1.0.1 --with-gmp-version=5.0.5 --with-gcc-version=4.9 --with-gdb-version=none --with-gxx-include-dir=/tmp/59719db9ae19ff43aef46bbcb79596b6/include/c++/4.9.x --with-bugurl=http://source.android.com/source/report-bugs.html --enable-languages=c,c++ --disable-bootstrap --enable-plugins --enable-libgomp --enable-gnu-indirect-function --disable-libsanitizer --enable-gold --enable-threads --enable-eh-frame-hdr-for-static --enable-graphite=yes --with-isl-version=0.11.1 --with-cloog-version=0.18.0 --with-arch=armv5te --program-transform-name='s&^&arm-linux-androideabi-&' --enable-gold=default
Thread model: posix
gcc version 4.9.x 20150123 (prerelease) (GCC)
[perfbuilder@490c2c7bdaab ~]$
It doesn't build on the r15b as well.
I'll investigate after lunch.
- Arnaldo
> It's also available in here:
> git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
> perf/fixes
>
> thanks,
> jirka
>
>
> ---
> Jiri Olsa (12):
> libperf: Add mmap_event to perf/event.h
> libperf: Add mmap2_event to perf/event.h
> libperf: Add comm_event to perf/event.h
> libperf: Add namespaces_event to perf/event.h
> libperf: Add fork_event to perf/event.h
> libperf: Add lost_event to perf/event.h
> libperf: Add lost_samples_event to perf/event.h
> libperf: Add read_event to perf/event.h
> libperf: Add throttle_event to perf/event.h
> libperf: Add ksymbol_event to perf/event.h
> libperf: Add bpf_event to perf/event.h
> libperf: Add sample_event to perf/event.h
>
> tools/perf/builtin-sched.c | 2 +-
> tools/perf/lib/include/perf/event.h | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> tools/perf/util/event.c | 12 ++++++------
> tools/perf/util/event.h | 104 +++-----------------------------------------------------------------------------------------------------
> tools/perf/util/evlist.c | 2 +-
> tools/perf/util/evsel.c | 8 ++++----
> tools/perf/util/machine.c | 4 ++--
> tools/perf/util/python.c | 14 +++++++-------
> tools/perf/util/session.c | 8 ++++----
> 9 files changed, 140 insertions(+), 126 deletions(-)
> create mode 100644 tools/perf/lib/include/perf/event.h
--
- Arnaldo
next prev parent reply other threads:[~2019-08-26 16:06 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-25 18:17 [PATCH 00/12] libperf: Add events to perf/event.h Jiri Olsa
2019-08-25 18:17 ` [PATCH 01/12] libperf: Add mmap_event " Jiri Olsa
2019-08-27 8:26 ` [tip: perf/core] libperf: Add PERF_RECORD_MMAP 'struct mmap_event' " tip-bot2 for Jiri Olsa
2019-08-25 18:17 ` [PATCH 02/12] libperf: Add mmap2_event " Jiri Olsa
2019-08-25 18:17 ` [PATCH 03/12] libperf: Add comm_event " Jiri Olsa
2019-08-27 8:26 ` [tip: perf/core] libperf: Add PERF_RECORD_COMM 'struct comm_event' " tip-bot2 for Jiri Olsa
2019-08-25 18:17 ` [PATCH 04/12] libperf: Add namespaces_event " Jiri Olsa
2019-08-27 8:26 ` [tip: perf/core] libperf: Add PERF_RECORD_NAMESPACES 'struct namespaces_event' " tip-bot2 for Jiri Olsa
2019-08-25 18:17 ` [PATCH 05/12] libperf: Add fork_event " Jiri Olsa
2019-08-27 8:26 ` [tip: perf/core] libperf: Add PERF_RECORD_FORK 'struct fork_event' " tip-bot2 for Jiri Olsa
2019-08-25 18:17 ` [PATCH 06/12] libperf: Add lost_event " Jiri Olsa
2019-08-27 8:26 ` [tip: perf/core] libperf: Add PERF_RECORD_LOST 'struct lost_event' " tip-bot2 for Jiri Olsa
2019-08-25 18:17 ` [PATCH 07/12] libperf: Add lost_samples_event " Jiri Olsa
2019-08-27 8:26 ` [tip: perf/core] libperf: Add PERF_RECORD_LOST_SAMPLES 'struct lost_samples_event' " tip-bot2 for Jiri Olsa
2019-08-25 18:17 ` [PATCH 08/12] libperf: Add read_event " Jiri Olsa
2019-08-27 8:26 ` [tip: perf/core] libperf: Add PERF_RECORD_READ 'struct read_event' " tip-bot2 for Jiri Olsa
2019-08-25 18:17 ` [PATCH 09/12] libperf: Add throttle_event " Jiri Olsa
2019-08-27 8:26 ` [tip: perf/core] libperf: Add PERF_RECORD_THROTTLE 'struct throttle_event' " tip-bot2 for Jiri Olsa
2019-08-25 18:17 ` [PATCH 10/12] libperf: Add ksymbol_event " Jiri Olsa
2019-08-27 8:26 ` [tip: perf/core] libperf: Add PERF_RECORD_KSYMBOL 'struct ksymbol_event' " tip-bot2 for Jiri Olsa
2019-08-25 18:17 ` [PATCH 11/12] libperf: Add bpf_event " Jiri Olsa
2019-08-27 8:26 ` [tip: perf/core] libperf: Add PERF_RECORD_BPF_EVENT 'struct bpf_event' " tip-bot2 for Jiri Olsa
2019-08-25 18:17 ` [PATCH 12/12] libperf: Add sample_event " Jiri Olsa
2019-08-27 8:26 ` [tip: perf/core] libperf: Add PERF_RECORD_SAMPLE 'struct sample_event' " tip-bot2 for Jiri Olsa
2019-08-26 15:41 ` [PATCH 00/12] libperf: Add events " Arnaldo Carvalho de Melo
2019-08-26 16:47 ` Jiri Olsa
2019-08-26 22:08 ` Arnaldo Carvalho de Melo
2019-08-26 16:06 ` Arnaldo Carvalho de Melo [this message]
2019-08-26 16:18 ` Arnaldo Carvalho de Melo
2019-08-26 16:58 ` Jiri Olsa
2019-08-26 22:14 ` Arnaldo Carvalho de Melo
2019-08-26 22:41 ` Arnaldo Carvalho de Melo
2019-08-27 7:41 ` Jiri Olsa
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=20190826160627.GE24801@kernel.org \
--to=arnaldo.melo@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpetlan@redhat.com \
--cc=namhyung@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox