From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753937AbcKIOjr (ORCPT ); Wed, 9 Nov 2016 09:39:47 -0500 Received: from mail.kernel.org ([198.145.29.136]:33334 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752674AbcKIOjq (ORCPT ); Wed, 9 Nov 2016 09:39:46 -0500 Date: Wed, 9 Nov 2016 11:39:41 -0300 From: Arnaldo Carvalho de Melo To: Adrian Hunter Cc: Arnaldo Carvalho de Melo , Andi Kleen , linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH] perf tools pt: Remove obsolete paragraph in intel-pt.c Message-ID: <20161109143941.GH12125@kernel.org> References: <1478650260-30140-1-git-send-email-andi@firstfloor.org> <20161109131426.GD12125@kernel.org> <20161109135927.GE12125@kernel.org> <344fddd4-718b-ecf3-75f0-585eda90df6f@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <344fddd4-718b-ecf3-75f0-585eda90df6f@intel.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Nov 09, 2016 at 04:01:12PM +0200, Adrian Hunter escreveu: > On 09/11/16 15:59, Arnaldo Carvalho de Melo wrote: > > Em Wed, Nov 09, 2016 at 10:14:26AM -0300, Arnaldo Carvalho de Melo escreveu: > >> Em Tue, Nov 08, 2016 at 04:11:00PM -0800, Andi Kleen escreveu: > >>> From: Andi Kleen > >>> > >>> Since the unprivileged sched switch event was added in perf, > >>> PT doesn't need need perf_event_paranoid=-1 anymore for > >>> per cpu decoding. So remove the obsolete paragraph in > >>> the documentation. > >> > >> Thanks for pointing that out, I'll do something slightly different tho, > >> pointing out that from kernel X.Y.Z, when the unprivileged > >> PERF_RECORD_SWITCH metadata event was introduced, this is no longer an > >> issue, having to be considered only on older kernels. > > > > It ended up as: > > > > diff --git a/tools/perf/Documentation/intel-pt.txt b/tools/perf/Documentation/intel-pt.txt > > index c6c8318e38a2..4d12db118476 100644 > > --- a/tools/perf/Documentation/intel-pt.txt > > +++ b/tools/perf/Documentation/intel-pt.txt > > @@ -546,6 +546,18 @@ mode by using the --per-thread option. > > Privileged vs non-privileged users > > ---------------------------------- > > > > +The v4.2 kernel introduced support for a context switch metadata event, > > +PERF_RECORD_SWITCH, which allows unprivileged users to see when their processes > > +are scheduled out and in, just not by whom, which is left for the > > +PERF_RECORD_SWITCH_CPU_WIDE, that is only accessible in system wide context, > > +which in turn requires CAP_SYS_ADMIN. > > + > > +Please see the 45ac1403f564 ("perf: Add PERF_RECORD_SWITCH to indicate context > > +switches") commit, that introduces these metadata events for further info. > > + > > +When working with kernels < v4.2, the following considerations must be taken, > > +as the sched:sched_switch tracepoints will be used to receive such information: > > + > > Unless /proc/sys/kernel/perf_event_paranoid is set to -1, unprivileged users > > have memory limits imposed upon them. That affects what buffer sizes they can > > have as outlined above. > > Maybe put that last paragraph about memory limits above the new text. Ok, as it is not affected by the new text, thanks. - Arnaldo