Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753385AbbFKQy6 (ORCPT ); Thu, 11 Jun 2015 12:54:58 -0400 Received: from casper.infradead.org ([85.118.1.10]:41607 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751963AbbFKQy5 (ORCPT ); Thu, 11 Jun 2015 12:54:57 -0400 Date: Thu, 11 Jun 2015 18:54:49 +0200 From: Peter Zijlstra To: Andi Kleen Cc: Adrian Hunter , Arnaldo Carvalho de Melo , Ingo Molnar , linux-kernel@vger.kernel.org, Jiri Olsa , Stephane Eranian , mathieu.poirier@linaro.org, Pawel Moll Subject: Re: [RFC PATCH] perf: Add PERF_RECORD_SWITCH to indicate context switches Message-ID: <20150611165449.GM3644@twins.programming.kicks-ass.net> References: <1433859670-10806-1-git-send-email-adrian.hunter@intel.com> <20150611141548.GW19282@twins.programming.kicks-ass.net> <20150611163430.GC25760@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150611163430.GC25760@tassilo.jf.intel.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1243 Lines: 25 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/