From: Michael Ellerman <mpe@ellerman.id.au>
To: Cyril Bur <cyrilbur@gmail.com>, linuxppc-dev@ozlabs.org
Subject: Re: selftests/powerpc: PMU libs: use signed long to read perf_event_paranoid
Date: Wed, 6 Jul 2016 00:10:18 +1000 (AEST) [thread overview]
Message-ID: <3rkQky2FdXz9sf9@ozlabs.org> (raw)
In-Reply-To: <1456806396-27432-1-git-send-email-cyrilbur@gmail.com>
On Tue, 2016-01-03 at 04:26:36 UTC, Cyril Bur wrote:
> Excerpt from man 2 perf_event_open:
>
> /proc/sys/kernel/perf_event_paranoid
> The perf_event_paranoid file can be set to restrict access to the
> performance counters.
> 2 allow only user-space measurements.
> 1 allow both kernel and user measurements (default).
> 0 allow access to CPU-specific data but not raw tracepoint samples.
> -1 no restrictions.
>
> require_paranoia_below() should return 0 if perf_event_paranoid is below a
> specified level, the value from perf_event_paranoid is read into an
> unsigned long so the incorrect value is returned when perf_event_paranoid
> is set to -1.
>
> Without this patch applied there is the same number of selftests/powerpc
> which skip when /proc/sys/kernel/perf_event_paranoid is set to 1 or -1 but
> no skips when set to zero.
> With this patch applied there no skipped selftests/powerpc test when
> /proc/sys/kernel/perf_event_paranoid is set to 0 or -1.
>
> Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/d4ecdff2ecdb5c01c46f2a6b1b
cheers
prev parent reply other threads:[~2016-07-05 14:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 4:26 [PATCH] selftests/powerpc: PMU libs: use signed long to read perf_event_paranoid Cyril Bur
2016-07-05 14:10 ` Michael Ellerman [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=3rkQky2FdXz9sf9@ozlabs.org \
--to=mpe@ellerman.id.au \
--cc=cyrilbur@gmail.com \
--cc=linuxppc-dev@ozlabs.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).