mbox series

[v4,00/10] libtracefs dynamic events support

Message ID 20211104111047.302660-1-tz.stoyanov@gmail.com (mailing list archive)
Headers show
Series libtracefs dynamic events support | expand

Message

Tzvetomir Stoyanov (VMware) Nov. 4, 2021, 11:10 a.m. UTC
The libtracefs logic that works with ftrace dynamic events is unified
and capsulated into a new set of dynamic events APIs. This change makes
the code more consistent and reusable. Also, adding future libtracefs
support for uprobes and eprobes dynamic events is simplified.
The existing library APIs for kprobes and synthetic events are
reimplemented using the new dynamic events helpers.

This patch sets depends on "[PATCH v2 0/4] Modifications of some 'hist' APIs":
 https://lore.kernel.org/linux-trace-devel/20210924095702.151826-1-y.karadz@gmail.com/

Suggested-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>

v4 changes:
 - Redefined the dynamic events enum, so the items can be used in a bitmask.
 - Reimplement the logic for parsing dynamic event strings from ftrace files.
 - Coding style fixes.
 - Added more comments.

v3 changes:
 - Exposed dynamic events API as official tracefs APIs.
 - Removed kprobe specific APIs, that duplicate corresponding dynamic events
   APIs.
 - Updated unit tests and man pages with the new dynamic events APIs.
 - Fixed typos, found by Yordan. 

v2 changes:
 - Removed triple pointer from the APIs.
 - Reimplement dynamic events parsing using strtok_r instead of strchr.
 - Coding style fixes.


Tzvetomir Stoyanov (VMware) (10):
  libtracefs: New APIs for dynamic events
  libtracefs: New APIs for kprobe allocation
  libtracefs: Remove redundant kprobes APIs
  libtracefs: Change tracefs_kprobe_info API
  libtracefs: Reimplement kprobe raw APIs
  libtracefs: Extend kprobes unit test
  libtracefs: Rename tracefs_synth_init API
  libtracefs: Use the internal dynamic events API when creating
    synthetic events
  libtracefs: Update kprobes man pages
  libtracefs: Document dynamic events APIs

 Documentation/libtracefs-dynevents.txt | 251 +++++++++
 Documentation/libtracefs-kprobes.txt   | 111 ++--
 Documentation/libtracefs-synth.txt     |  20 +-
 Documentation/libtracefs-synth2.txt    |  10 +-
 Documentation/libtracefs.txt           |  17 +
 include/tracefs-local.h                |  18 +
 include/tracefs.h                      |  54 +-
 src/Makefile                           |   1 +
 src/tracefs-dynevents.c                | 689 +++++++++++++++++++++++++
 src/tracefs-hist.c                     | 125 +++--
 src/tracefs-kprobes.c                  | 530 ++++++-------------
 src/tracefs-sqlhist.c                  |   6 +-
 utest/tracefs-utest.c                  | 412 +++++++++------
 13 files changed, 1535 insertions(+), 709 deletions(-)
 create mode 100644 Documentation/libtracefs-dynevents.txt
 create mode 100644 src/tracefs-dynevents.c