Add new ioctl() to pause/resume ring-buffer output. In some situations we want to read from the ring-buffer only when we ensure nothing can write to the ring-buffer during reading. Without this patch we have to turn off all events attached to this ring-buffer to achieve this. This patch is a prerequisite to enable overwrite support for the perf ring-buffer support. Following commits will introduce new methods support reading from overwrite ring buffer. Before reading, caller must ensure the ring buffer is frozen, or the reading is unreliable.
Showing the changes to include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -401,6 +401,7 @@ struct perf_event_attr { · 400 unmodified lines | ||
| 401 | 401 | #define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *) |
| 402 | 402 | #define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *) |
| 403 | 403 | #define PERF_EVENT_IOC_SET_BPF _IOW('$', 8, __u32) |
| 404 | +#define PERF_EVENT_IOC_PAUSE_OUTPUT _IOW('$', 9, __u32) | |
| 404 | 405 | |
| 405 | 406 | enum perf_event_ioc_flags { |
| 406 | 407 | PERF_IOC_FLAG_GROUP = 1U << 0, |