mbox series

[v2,0/3] libtracefs: Introduce new API to reset ftrace instance

Message ID 20230426041124.69544-1-tz.stoyanov@gmail.com (mailing list archive)
Headers show
Series libtracefs: Introduce new API to reset ftrace instance | expand

Message

Tzvetomir Stoyanov (VMware) April 26, 2023, 4:11 a.m. UTC
A new API tracefs_instance_reset() for resetting instance to its default
state, based on the logic from "trace-cmd reset" command.

v2 changes:
 - Check if the kernel is configured with triggers enabled, before calling
   clear_trigger().
 - Clear "stack_trace_filter" file.
 - Fixed spelling and coding style errors.

Tzvetomir Stoyanov (VMware) (3):
  libtracefs: New API to reset ftrace instance
  libtracefs: Documentation for tracefs_instance_reset()
  libtracefs: Unit test for tracefs_instance_reset()

 Documentation/libtracefs-instances-manage.txt |   7 +-
 Documentation/libtracefs.txt                  |   1 +
 include/tracefs-local.h                       |   1 +
 include/tracefs.h                             |   1 +
 src/tracefs-instance.c                        | 207 ++++++++++++++++++
 src/tracefs-utils.c                           |  20 ++
 utest/tracefs-utest.c                         | 183 ++++++++++++++++
 7 files changed, 418 insertions(+), 2 deletions(-)