From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Raphael Gault <raphael.gault@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, mingo@redhat.com,
peterz@infradead.org, catalin.marinas@arm.com,
will.deacon@arm.com, mark.rutland@arm.com
Subject: Re: [PATCH v2 1/5] perf: arm64: Add test to check userspace access to hardware counters.
Date: Fri, 5 Jul 2019 11:54:36 -0300 [thread overview]
Message-ID: <20190705145436.GA29396@kernel.org> (raw)
In-Reply-To: <20190705085541.9356-2-raphael.gault@arm.com>
Em Fri, Jul 05, 2019 at 09:55:37AM +0100, Raphael Gault escreveu:
> This test relies on the fact that the PMU registers are accessible
> from userspace. It then uses the perf_event_mmap_page to retrieve
> the counter index and access the underlying register.
>
> This test uses sched_setaffinity(2) in order to run on all CPU and thus
> check the behaviour of the PMU of all cpus in a big.LITTLE environment.
>
> Signed-off-by: Raphael Gault <raphael.gault@arm.com>
> ---
> tools/perf/arch/arm64/include/arch-tests.h | 6 +
> tools/perf/arch/arm64/tests/Build | 1 +
> tools/perf/arch/arm64/tests/arch-tests.c | 4 +
> tools/perf/arch/arm64/tests/user-events.c | 255 +++++++++++++++++++++
> 4 files changed, 266 insertions(+)
> create mode 100644 tools/perf/arch/arm64/tests/user-events.c
>
> diff --git a/tools/perf/arch/arm64/include/arch-tests.h b/tools/perf/arch/arm64/include/arch-tests.h
> index 90ec4c8cb880..a9b17ae0560b 100644
> --- a/tools/perf/arch/arm64/include/arch-tests.h
> +++ b/tools/perf/arch/arm64/include/arch-tests.h
> @@ -2,11 +2,17 @@
> #ifndef ARCH_TESTS_H
> #define ARCH_TESTS_H
>
> +#define __maybe_unused __attribute__((unused))
What is wrong with using:
#include <linux/compiler.h>
?
[acme@quaco perf]$ find tools/perf/ -name "*.[ch]" | xargs grep __maybe_unused | wc -l
1115
[acme@quaco perf]$ grep __maybe_unused tools/include/linux/compiler.h
#ifndef __maybe_unused
# define __maybe_unused __attribute__((unused))
[acme@quaco perf]$
Also please don't break strings in multiple lines just to comply with
the 80 column limit. That is ok when you have multiple lines ending with
a newline, but otherwise just makes it look ugly.
- Arnaldo
next prev parent reply other threads:[~2019-07-05 14:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-05 8:55 [PATCH v2 0/5] arm64: Enable access to pmu registers by user-space Raphael Gault
2019-07-05 8:55 ` [PATCH v2 1/5] perf: arm64: Add test to check userspace access to hardware counters Raphael Gault
2019-07-05 14:54 ` Arnaldo Carvalho de Melo [this message]
2019-07-08 7:10 ` Raphael Gault
2019-07-05 8:55 ` [PATCH v2 2/5] arm64: cpufeature: Add feature to detect heterogeneous systems Raphael Gault
2019-07-05 8:55 ` [PATCH v2 3/5] arm64: pmu: Add function implementation to update event index in userpage Raphael Gault
2019-07-05 8:55 ` [PATCH v2 4/5] arm64: perf: Enable pmu counter direct access for perf event on armv8 Raphael Gault
2019-07-05 8:55 ` [PATCH v2 5/5] Documentation: arm64: Document PMU counters access from userspace Raphael Gault
2019-07-23 14:49 ` [PATCH v2 0/5] arm64: Enable access to pmu registers by user-space Raphael Gault
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=20190705145436.GA29396@kernel.org \
--to=arnaldo.melo@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=raphael.gault@arm.com \
--cc=will.deacon@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).