Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964798AbcJVKDC (ORCPT ); Sat, 22 Oct 2016 06:03:02 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33238 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936440AbcJVKC6 (ORCPT ); Sat, 22 Oct 2016 06:02:58 -0400 Subject: Re: [PATCH 1/2] perf_event_open.2: Document PERF_EVENT_IOC_PAUSE_OUTPUT To: Wang Nan References: <1477049893-143199-1-git-send-email-wangnan0@huawei.com> Cc: mtk.manpages@gmail.com, pi3orama@163.com, linux-kernel@vger.kernel.org, linux-man@vger.kernel.org, lizefan@huawei.com, vincent.weaver@maine.edu From: "Michael Kerrisk (man-pages)" Message-ID: Date: Sat, 22 Oct 2016 12:02:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1477049893-143199-1-git-send-email-wangnan0@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1740 Lines: 65 Hello Wang Nan Thanks for this patch! A few comments below. On 10/21/2016 01:38 PM, Wang Nan wrote: > Linux 4.7 (86e7972f690c1017fd086cdfe53d8524e68c661c) introduces > PERF_EVENT_IOC_PAUSE_OUTPUT feature. Document it. > > Signed-off-by: Wang Nan > Cc: Michael Kerrisk > --- > man2/perf_event_open.2 | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2 > index fade28c..2d3acad 100644 > --- a/man2/perf_event_open.2 > +++ b/man2/perf_event_open.2 > @@ -2865,7 +2865,18 @@ The argument is a BPF program file descriptor that was created by > a previous > .BR bpf (2) > system call. > -.SS Using prctl(2) > +.TP > +.BR PERF_EVENT_IOC_PAUSE_OUTPUT " (since Linux 4.7)" > +.\" commit 86e7972f690c1017fd086cdfe53d8524e68c661c > +This allows pausing and resuming the event's ring-buffer. A > +paused ring-buffer does not prevent samples generation, but simply s/samples generation/generation of samples/ > +discards them. The discarded samples are considered lost, causes s/them/the samples/ s/causes/causing/ > +.BR PERF_RECORD_LOST > +to be generated when possible. > + > +The argument is an integer. Nonzero value pauses the ring-buffer, s/Nonzero/a nonzero/ > +zero value resumes the ring-buffer. s/zero value/zero/ > +.SS Using prctl As noted by Vince, the change to this SS line should not be part of this patch. > A process can enable or disable all the event groups that are > attached to it using the > .BR prctl (2) Thanks, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/