summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evlist.h
diff options
context:
space:
mode:
authorWang Nan2016-05-09 03:47:50 +0200
committerArnaldo Carvalho de Melo2016-05-09 22:20:53 +0200
commite24c7520ea9c3e5bb51592c2134aafbf75a3f88a (patch)
treefe6c5e5e1f3ef7676b71a3e3b555a2a6a2647232 /tools/perf/util/evlist.h
parentperf script: Fix incorrect python db-export error message (diff)
downloadkernel-qcow2-linux-e24c7520ea9c3e5bb51592c2134aafbf75a3f88a.tar.gz
kernel-qcow2-linux-e24c7520ea9c3e5bb51592c2134aafbf75a3f88a.tar.xz
kernel-qcow2-linux-e24c7520ea9c3e5bb51592c2134aafbf75a3f88a.zip
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>
Diffstat (limited to 'tools/perf/util/evlist.h')
-rw-r--r--tools/perf/util/evlist.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index 208897a646ca..85d1b59802e8 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -129,6 +129,10 @@ struct perf_sample_id *perf_evlist__id2sid(struct perf_evlist *evlist, u64 id);
union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx);
+union perf_event *perf_evlist__mmap_read_backward(struct perf_evlist *evlist,
+ int idx);
+void perf_evlist__mmap_read_catchup(struct perf_evlist *evlist, int idx);
+
void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx);
int perf_evlist__open(struct perf_evlist *evlist);