diff options
| author | Kan Liang <[email protected]> | 2018-01-18 21:26:23 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2018-02-15 12:53:40 +0000 |
| commit | 7bb45972952db9298fe5cc440160dcad1a66bfbc (patch) | |
| tree | c7642dbb2f3e4c5a9be33ac4c891c102b3424928 /net/unix/af_unix.c | |
| parent | perf mmap: Introduce perf_mmap__read_done() (diff) | |
| download | kernel-7bb45972952db9298fe5cc440160dcad1a66bfbc.tar.gz kernel-7bb45972952db9298fe5cc440160dcad1a66bfbc.zip | |
perf mmap: Introduce perf_mmap__read_event()
Except for 'perf record', the other perf tools read events one by one
from the ring buffer using perf_mmap__read_forward(). But it only
supports non-overwrite mode.
Introduce perf_mmap__read_event() to support both non-overwrite and
overwrite mode.
Usage:
perf_mmap__read_init()
while(event = perf_mmap__read_event()) {
//process the event
perf_mmap__consume()
}
perf_mmap__read_done()
It cannot use perf_mmap__read_backward(). Because it always reads the
stale buffer which is already processed. Furthermore, the forward and
backward concepts have been removed. The perf_mmap__read_backward() will
be replaced and discarded later.
Signed-off-by: Kan Liang <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Jin Yao <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
