History

perf/ring_buffer: Introduce new ioctl options to pause and resume the ring-buffer

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.

Wang Nan committed 10 years ago

Commit 86e79721 parent 0a74c5b4 files · +34 −1Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/perf_event.h+1−0
@@ -401,6 +401,7 @@ struct perf_event_attr { · 400 unmodified lines
401#define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *)401#define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *)
402#define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *)402#define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *)
403#define PERF_EVENT_IOC_SET_BPF _IOW('$', 8, __u32)403#define PERF_EVENT_IOC_SET_BPF _IOW('$', 8, __u32)
404#define PERF_EVENT_IOC_PAUSE_OUTPUT _IOW('$', 9, __u32)
404 405
405enum perf_event_ioc_flags {406enum perf_event_ioc_flags {
406 PERF_IOC_FLAG_GROUP = 1U << 0,407 PERF_IOC_FLAG_GROUP = 1U << 0,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t