The PERF_EVENT_IOC_PAUSE_OUTPUT ioctl was introduced in Linux 4.7. I've have this patch for a long time, I apologize for the delay in getting it submitted. I've made some minor changes to the original patch proposed by Wang Nan. Signed-off-by: Wang Nan <wangnan0@xxxxxxxxxx> Reviewed-by: Vince Weaver <vincent.weaver@xxxxxxxxx> diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2 index d5b2d060d..acd88f181 100644 --- a/man2/perf_event_open.2 +++ b/man2/perf_event_open.2 @@ -2928,6 +2930,21 @@ The argument is a BPF program file descriptor that was created by a previous .BR bpf (2) system call. +.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 generation of samples, +but simply discards them. +The discarded samples are considered lost, and cause a +.BR PERF_RECORD_LOST +sample to be generated when possible. +An overflow signal may still be triggered by the discarded sample +even though the ring-buffer remains empty. +.IP +The argument is an unsigned 32-bit integer. +A nonzero value pauses the ring-buffer, while a +zero value resumes the ring-buffer. .SS Using prctl(2) A process can enable or disable all the event groups that are attached to it using the -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html