]> 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)
commit227c06a726dde15c4cd2ea93557798fb517f9d6d
treefe6c5e5e1f3ef7676b71a3e3b555a2a6a2647232
parent28c85565e0c345072dcc6ea4ff0214fe6fe047c4
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