Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932708AbcJULjL (ORCPT ); Fri, 21 Oct 2016 07:39:11 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:17285 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932498AbcJULjH (ORCPT ); Fri, 21 Oct 2016 07:39:07 -0400 From: Wang Nan To: CC: , , , , , Subject: [PATCH 1/2] perf_event_open.2: Document PERF_EVENT_IOC_PAUSE_OUTPUT Date: Fri, 21 Oct 2016 11:38:12 +0000 Message-ID: <1477049893-143199-1-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1199 Lines: 35 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 +discards them. The discarded samples are considered lost, causes +.BR PERF_RECORD_LOST +to be generated when possible. + +The argument is an integer. Nonzero value pauses the ring-buffer, +zero value resumes the ring-buffer. +.SS Using prctl A process can enable or disable all the event groups that are attached to it using the .BR prctl (2) -- 2.10.1