All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Cc: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Subject: [PATCH v3 0/7] libtracefs: Facilitate adding and removing kprobes
Date: Thu,  1 Jul 2021 23:10:15 -0400	[thread overview]
Message-ID: <20210702031022.154146-1-rostedt@goodmis.org> (raw)

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

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 v2: https://lore.kernel.org/linux-trace-devel/20210630154729.129873-1-rostedt@goodmis.org/

 - Added helper function tracefs_get_kprobes() that return a list of
   kprobe events, that the clear functions can now use, and simplify
   their code.

 - Rename tracefs_kprobe_clear to tracefs_kprobe_clear_all()

 - Have tracefs_kprobe_clear_probe() take a NULL for the event
   to remove all kprobes for a given system.

 - Added man pages.

Steven Rostedt (VMware) (7):
  libtracefs: Implement tracefs_instances()
  libtracefs: Implement tracefs_kprobe_raw()
  libtracefs: Implement tracefs_kretprobe_raw()
  libtracefs: Implement tracefs_get_kprobes()
  libtracefs: Implement tracefs_kprobe_clear_all() to remove all kprobes
  libtracefs: Implement tracefs_kprobe_clear_probe()
  libtracefs: Add man pages for kprobe functions

 Documentation/libtracefs-kprobes.txt | 275 +++++++++++++++++++++
 include/tracefs.h                    |   9 +
 src/Makefile                         |   1 +
 src/tracefs-instance.c               |  78 ++++++
 src/tracefs-kprobes.c                | 351 +++++++++++++++++++++++++++
 5 files changed, 714 insertions(+)
 create mode 100644 Documentation/libtracefs-kprobes.txt
 create mode 100644 src/tracefs-kprobes.c

-- 
2.30.2


             reply	other threads:[~2021-07-02  3:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-02  3:10 Steven Rostedt [this message]
2021-07-02  3:10 ` [PATCH v3 1/7] libtracefs: Implement tracefs_instances() Steven Rostedt
2021-07-02  3:10 ` [PATCH v3 2/7] libtracefs: Implement tracefs_kprobe_raw() Steven Rostedt
2021-07-02  3:10 ` [PATCH v3 3/7] libtracefs: Implement tracefs_kretprobe_raw() Steven Rostedt
2021-07-02  3:10 ` [PATCH v3 4/7] libtracefs: Implement tracefs_get_kprobes() Steven Rostedt
2021-07-02  3:10 ` [PATCH v3 5/7] libtracefs: Implement tracefs_kprobe_clear_all() to remove all kprobes Steven Rostedt
2021-07-02  3:10 ` [PATCH v3 6/7] libtracefs: Implement tracefs_kprobe_clear_probe() Steven Rostedt
2021-07-02  3:10 ` [PATCH v3 7/7] libtracefs: Add man pages for kprobe functions Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210702031022.154146-1-rostedt@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.