mbox series

[v2,00/12] libtracefs dynamic events support

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

Message

Tzvetomir Stoyanov (VMware) Nov. 1, 2021, 9:08 a.m. UTC
The libtracefs logic that works with ftrace dynamic events is unified and
capsulated into internal 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.

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

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

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

 Documentation/libtracefs-kprobes.txt | 131 ++++---
 Documentation/libtracefs-synth.txt   |  20 +-
 Documentation/libtracefs-synth2.txt  |  10 +-
 Documentation/libtracefs-utils.txt   |   6 +-
 Documentation/libtracefs.txt         |  12 +
 include/tracefs-local.h              |  35 ++
 include/tracefs.h                    |  38 +-
 src/Makefile                         |   1 +
 src/tracefs-dynevents.c              | 492 ++++++++++++++++++++++++++
 src/tracefs-hist.c                   | 110 +++---
 src/tracefs-kprobes.c                | 508 +++++++++++++--------------
 src/tracefs-sqlhist.c                |   6 +-
 utest/tracefs-utest.c                | 408 ++++++++++++---------
 13 files changed, 1187 insertions(+), 590 deletions(-)
 create mode 100644 src/tracefs-dynevents.c

Comments

Tzvetomir Stoyanov (VMware) Nov. 1, 2021, 2:21 p.m. UTC | #1
On Mon, Nov 1, 2021 at 11:09 AM Tzvetomir Stoyanov (VMware)
<tz.stoyanov@gmail.com> wrote:
>
> The libtracefs logic that works with ftrace dynamic events is unified and
> capsulated into internal 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.
>

Forgot to add that this patch set 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>
>
> v2 changes:
>  - Removed triple pointer from the APIs.
>  - Reimplement dynamic events parsing using strtok_r instead of strchr.
>  - Coding style fixes.
>
> Tzvetomir Stoyanov (VMware) (12):
>   libtracefs: Add new internal APIs for dynamic events
>   libtracefs: Rename tracefs_get_kprobes API
>   libtracefs: New kprobes APIs
>   libtracefs: Remove redundant kprobes APIs
>   libtracefs: Reimplement tracefs_kprobes_get API
>   libtracefs: Change tracefs_kprobe_info API
>   libtracefs: Reimplement kprobe raw APIs
>   libtracefs: Extend kprobes unit test
>   libtracefs: Update kprobes man pages
>   libtracefs: Rename tracefs_synth_init API
>   libtracefs: Use the internal dynamic events API when creating
>     synthetic events
>   libtracefs: Document tracefs_dynevent_list_free() API
>
>  Documentation/libtracefs-kprobes.txt | 131 ++++---
>  Documentation/libtracefs-synth.txt   |  20 +-
>  Documentation/libtracefs-synth2.txt  |  10 +-
>  Documentation/libtracefs-utils.txt   |   6 +-
>  Documentation/libtracefs.txt         |  12 +
>  include/tracefs-local.h              |  35 ++
>  include/tracefs.h                    |  38 +-
>  src/Makefile                         |   1 +
>  src/tracefs-dynevents.c              | 492 ++++++++++++++++++++++++++
>  src/tracefs-hist.c                   | 110 +++---
>  src/tracefs-kprobes.c                | 508 +++++++++++++--------------
>  src/tracefs-sqlhist.c                |   6 +-
>  utest/tracefs-utest.c                | 408 ++++++++++++---------
>  13 files changed, 1187 insertions(+), 590 deletions(-)
>  create mode 100644 src/tracefs-dynevents.c
>
> --
> 2.31.1
>