diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2021-04-30 09:03:03 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-05-12 17:43:11 +0200 |
commit | 6aa3afc9c8b7bca75640e5aaa67f04dcb158b325 (patch) | |
tree | 78967f236571ef3bcb28e854fa65488a9e1f64f8 /tools/perf/util/auxtrace.h | |
parent | perf inject: Add --vm-time-correlation option (diff) | |
download | linux-6aa3afc9c8b7bca75640e5aaa67f04dcb158b325.tar.xz linux-6aa3afc9c8b7bca75640e5aaa67f04dcb158b325.zip |
perf auxtrace: Allow buffers to be mapped read / write
To support in-place update, allow buffers to be mapped read / write.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/r/20210430070309.17624-7-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/auxtrace.h')
-rw-r--r-- | tools/perf/util/auxtrace.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h index 9ac2ac1bd793..472c0973b1f1 100644 --- a/tools/perf/util/auxtrace.h +++ b/tools/perf/util/auxtrace.h @@ -533,7 +533,11 @@ int auxtrace_queue_data(struct perf_session *session, bool samples, bool events); struct auxtrace_buffer *auxtrace_buffer__next(struct auxtrace_queue *queue, struct auxtrace_buffer *buffer); -void *auxtrace_buffer__get_data(struct auxtrace_buffer *buffer, int fd); +void *auxtrace_buffer__get_data_rw(struct auxtrace_buffer *buffer, int fd, bool rw); +static inline void *auxtrace_buffer__get_data(struct auxtrace_buffer *buffer, int fd) +{ + return auxtrace_buffer__get_data_rw(buffer, fd, false); +} void auxtrace_buffer__put_data(struct auxtrace_buffer *buffer); void auxtrace_buffer__drop_data(struct auxtrace_buffer *buffer); void auxtrace_buffer__free(struct auxtrace_buffer *buffer); |