]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Support reading from backward ring buffer
authorWang Nan <wangnan0@huawei.com>
Mon, 9 May 2016 01:47:50 +0000 (01:47 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 9 May 2016 20:20:53 +0000 (17:20 -0300)
commit8bd07da816c6bb03fd0ef97146df961e3607eafc
treefe6c5e5e1f3ef7676b71a3e3b555a2a6a2647232
parentabaf14db60b992defb9bd105f9027547e6b18126
perf tools: Support reading from backward ring buffer

perf_evlist__mmap_read_backward() is introduced for reading backward
ring buffer. Since direction for reading such ring buffer is different
from the direction kernel writing to it, and since user need to fetch
most recent record from it, a perf_evlist__mmap_read_catchup() is
introduced to move the reading pointer to the end of the buffer.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1462758471-89706-2-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evlist.c
tools/perf/util/evlist.h