From: Peter Zijlstra <peterz@infradead.org>
To: Andi Kleen <ak@linux.intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>,
Stephane Eranian <eranian@google.com>,
mathieu.poirier@linaro.org, Pawel Moll <pawel.moll@arm.com>
Subject: Re: [RFC PATCH] perf: Add PERF_RECORD_SWITCH to indicate context switches
Date: Thu, 11 Jun 2015 18:54:49 +0200 [thread overview]
Message-ID: <20150611165449.GM3644@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20150611163430.GC25760@tassilo.jf.intel.com>
On Thu, Jun 11, 2015 at 09:34:30AM -0700, Andi Kleen wrote:
> On Thu, Jun 11, 2015 at 04:15:48PM +0200, Peter Zijlstra wrote:
> > On Tue, Jun 09, 2015 at 05:21:10PM +0300, Adrian Hunter wrote:
> > > Tracepoints are no good at all for non-privileged users
> > > because they need either CAP_SYS_ADMIN or
> > > /proc/sys/kernel/perf_event_paranoid <= -1.
> > >
> > > On the other hand, kernel software events need either
> > > CAP_SYS_ADMIN or /proc/sys/kernel/perf_event_paranoid <= 1.
> >
> > So while I think it makes sense to allow some tracepoint outside of that
> > priv level, IOW have a per tracepoint priv level filter thingy, I don't
> > think sched_switch() is one of those because it explicitly exposes
> > timing information on other tasks.
>
> It's trivial for a running program to measure when it gets context switched
> by looking at timing. I don't think this event provides anything new over that.
The _existing_ ones expose timing of _other_ tasks, the proposed one does
not.
next prev parent reply other threads:[~2015-06-11 16:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 14:21 Adrian Hunter
2015-06-11 14:15 ` Peter Zijlstra
2015-06-11 16:34 ` Andi Kleen
2015-06-11 16:54 ` Peter Zijlstra [this message]
2015-06-12 0:47 ` David Ahern
2015-06-12 10:34 ` Adrian Hunter
2015-06-12 14:21 ` David Ahern
2015-06-12 16:13 ` Adrian Hunter
2015-06-12 11:12 ` Adrian Hunter
2015-06-12 12:09 ` Peter Zijlstra
2015-06-12 12:36 ` Arnaldo Carvalho de Melo
2015-06-12 13:15 ` Adrian Hunter
2015-06-12 13:28 ` Pawel Moll
2015-06-12 13:52 ` Pawel Moll
2015-06-12 14:30 ` David Ahern
2015-06-12 14:29 ` David Ahern
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=20150611165449.GM3644@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@kernel.org \
--cc=pawel.moll@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
all inboxes | Powered by JetHome®