linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 00/10] libtracefs: Facilitate adding and removing kprobes
@ 2021-07-02 20:17 Steven Rostedt
  2021-07-02 20:17 ` [PATCH v7 01/10] libtracefs: Implement tracefs_instances() Steven Rostedt
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Steven Rostedt @ 2021-07-02 20:17 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Steven Rostedt

Add a tracefs_kprobe_raw() to facilitate adding kprobe events. It's
denoted as "raw" because it still requires knowing the complex format of
a kprobe, but at least it helps with other formats:

 p:[[system/]event] addr fmt

The user only needs to know the "fmt" part above, and not worry about
what file to open, or how to open it.

Also add a tracefs_kprobe_clear() to clear all kprobes and a
tracefs_kprobe_clear_probe() to clear an individual kprobe. Both have a
"force" parameter, that if set, will then try to disable the kprobe in
all instances (including the top) and then remove the kprobe(s).

Changes since v6: https://lore.kernel.org/linux-trace-devel/20210702185616.167778-1-rostedt@goodmis.org/

 - Fixed some utest cases that used strcmp() when it should have used
   !strcmp().

This should be the last version before I push (I hope!)

Steven Rostedt (VMware) (10):
  libtracefs: Implement tracefs_instances()
  libtracefs: Implement tracefs_kprobe_raw()
  libtracefs: Implement tracefs_kretprobe_raw()
  libtracefs: Implement tracefs_get_kprobes()
  libtracefs: Add helper function to parse kprobes
  libtracefs: Implement tracefs_kprobe_info()
  libtracefs: Implement tracefs_kprobe_clear_all() to remove all kprobes
  libtracefs: Implement tracefs_kprobe_clear_probe()
  libtracefs: Add man pages for kprobe functions
  libtracefs: Update the unit tests to use the kprobe API instead

 Documentation/libtracefs-kprobes.txt | 297 ++++++++++++++++
 include/tracefs.h                    |  17 +
 src/Makefile                         |   1 +
 src/tracefs-instance.c               |  76 +++++
 src/tracefs-kprobes.c                | 485 +++++++++++++++++++++++++++
 utest/tracefs-utest.c                | 195 +++++++++--
 6 files changed, 1042 insertions(+), 29 deletions(-)
 create mode 100644 Documentation/libtracefs-kprobes.txt
 create mode 100644 src/tracefs-kprobes.c

-- 
2.30.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-07-02 20:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-02 20:17 [PATCH v7 00/10] libtracefs: Facilitate adding and removing kprobes Steven Rostedt
2021-07-02 20:17 ` [PATCH v7 01/10] libtracefs: Implement tracefs_instances() Steven Rostedt
2021-07-02 20:17 ` [PATCH v7 02/10] libtracefs: Implement tracefs_kprobe_raw() Steven Rostedt
2021-07-02 20:17 ` [PATCH v7 03/10] libtracefs: Implement tracefs_kretprobe_raw() Steven Rostedt
2021-07-02 20:17 ` [PATCH v7 04/10] libtracefs: Implement tracefs_get_kprobes() Steven Rostedt
2021-07-02 20:17 ` [PATCH v7 05/10] libtracefs: Add helper function to parse kprobes Steven Rostedt
2021-07-02 20:17 ` [PATCH v7 06/10] libtracefs: Implement tracefs_kprobe_info() Steven Rostedt
2021-07-02 20:17 ` [PATCH v7 07/10] libtracefs: Implement tracefs_kprobe_clear_all() to remove all kprobes Steven Rostedt
2021-07-02 20:17 ` [PATCH v7 08/10] libtracefs: Implement tracefs_kprobe_clear_probe() Steven Rostedt
2021-07-02 20:17 ` [PATCH v7 09/10] libtracefs: Add man pages for kprobe functions Steven Rostedt
2021-07-02 20:17 ` [PATCH v7 10/10] libtracefs: Update the unit tests to use the kprobe API instead Steven Rostedt

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox