From patchwork Fri Oct 21 11:38:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 78646 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp1251056qge; Fri, 21 Oct 2016 04:39:20 -0700 (PDT) X-Received: by 10.99.98.5 with SMTP id w5mr657002pgb.77.1477049960492; Fri, 21 Oct 2016 04:39:20 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si2385482pgf.47.2016.10.21.04.39.20; Fri, 21 Oct 2016 04:39:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932712AbcJULjL (ORCPT + 27 others); 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 Received: from 172.24.1.47 (EHLO szxeml433-hub.china.huawei.com) ([172.24.1.47]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id CKB09698; Fri, 21 Oct 2016 19:38:56 +0800 (CST) Received: from linux-4hy3.site (10.107.193.248) by szxeml433-hub.china.huawei.com (10.82.67.210) with Microsoft SMTP Server id 14.3.235.1; Fri, 21 Oct 2016 19:38:46 +0800 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 X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.10.1 Reviewed-by: Vince Weaver 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)