aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.h
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2019-11-15 14:42:20 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-11-22 10:48:13 -0300
commit103ed40e4bfa6986d80983b3e67be9d2f61fc9ee (patch)
tree3246c40e68a49039ca51b5a235f90abd8e9eefeb /tools/perf/util/session.h
parentperf auxtrace: Add support for dumping AUX area samples (diff)
downloadlinux-dev-103ed40e4bfa6986d80983b3e67be9d2f61fc9ee.tar.xz
linux-dev-103ed40e4bfa6986d80983b3e67be9d2f61fc9ee.zip
perf session: Add facility to peek at all events
AUX area samples are not limited in how far back in time the sample could start. Consequently samples must be queued in advance to allow for time-ordered processing. To achieve that, add perf_session__peek_events() that walks and peeks at all the events. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lore.kernel.org/lkml/20191115124225.5247-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r--tools/perf/util/session.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 8456e1d868fd..f76480166d38 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -64,6 +64,11 @@ int perf_session__peek_event(struct perf_session *session, off_t file_offset,
void *buf, size_t buf_sz,
union perf_event **event_ptr,
struct perf_sample *sample);
+typedef int (*peek_events_cb_t)(struct perf_session *session,
+ union perf_event *event, u64 offset,
+ void *data);
+int perf_session__peek_events(struct perf_session *session, u64 offset,
+ u64 size, peek_events_cb_t cb, void *data);
int perf_session__process_events(struct perf_session *session);