mbox series

[0/7] libtracefs: More fixes for memory mapping ring buffer API

Message ID 20240110030116.81837-1-rostedt@goodmis.org (mailing list archive)
Headers show
Series libtracefs: More fixes for memory mapping ring buffer API | expand

Message

Steven Rostedt Jan. 10, 2024, 2:51 a.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

Now all the read APIs support memory mapped ring buffer.

For those that use splice and pipe, if the tcpu is memory mapped, it will
then fall back to copying directly from the memory map.

Also added a tracfes_mapping_is_supported() API to test if the kernel and
library support memory mapping.

And updated the tests to use memory mapped ring buffers when possible.

Steven Rostedt (Google) (7):
  libtracefs: Have mapping work with the other tracefs_cpu* functions
  libtracefs: Have tracefs_mmap_read() include subbuf meta data
  libtracefs: Have nonblock tracefs_cpu reads set errno EAGAIN
  libtracefs: Fix tracefs_mmap() kbuf usage
  libtracefs: Call mmap ioctl if a refresh happens
  libtracefs: Add tracefs_mapped_is_supported() API
  libtracefs utest: Add tests to use mapping if supported

 Documentation/libtracefs-cpu-map.txt | 38 ++++++++++++---
 Documentation/libtracefs.txt         |  1 +
 include/tracefs.h                    |  1 +
 src/tracefs-events.c                 |  8 +---
 src/tracefs-mmap.c                   | 28 +++++++++--
 src/tracefs-record.c                 | 72 +++++++++++++++++++++++++++-
 utest/tracefs-utest.c                | 69 ++++++++++++++++++--------
 7 files changed, 176 insertions(+), 41 deletions(-)