On Tue, Mar 29, 2016 at 02:05:07AM +0000, Wang Nan wrote: > Add new ioctl() to pause/resume ring-buffer output. > > In some situations we want to read from 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 for supporting overwrite ring buffer. 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. > > Signed-off-by: Wang Nan <wangn...@huawei.com> > Cc: He Kuang <heku...@huawei.com> > Cc: Alexei Starovoitov <a...@kernel.org> > Cc: Arnaldo Carvalho de Melo <a...@redhat.com> > Cc: Brendan Gregg <brendan.d.gr...@gmail.com> > Cc: Jiri Olsa <jo...@kernel.org> > Cc: Masami Hiramatsu <masami.hiramatsu...@hitachi.com> > Cc: Namhyung Kim <namhy...@kernel.org> > Cc: Peter Zijlstra <pet...@infradead.org> > Cc: Zefan Li <lize...@huawei.com> > Cc: pi3or...@163.com > --- > include/uapi/linux/perf_event.h | 1 + > kernel/events/core.c | 13 +++++++++++++ > kernel/events/internal.h | 11 +++++++++++ > kernel/events/ring_buffer.c | 7 ++++++- > 4 files changed, 31 insertions(+), 1 deletion(-)
Acked-by: Alexei Starovoitov <a...@kernel.org>