libtracefs: Implement tracefs_kretprobe_raw()
PATCH 1/1 libtracefs: Implement tracefs_kretprobe_raw()
From: "Steven Rostedt (VMware)" <[email protected]>
Add an interface that is similar to tracefs_kprobe_raw() but creates a "kretprobe". The difference between a kprobe and a kretprobe is that a kretprobe comes at the end of a function.
See Documentation/trace/kprobetrace.rst in the Linux kernel source code for more information. Note, kprobes are started with "p" and kretprobe lines start with an "r".
Signed-off-by Steven Rostedt (VMware) <[email protected]>
--- include/tracefs.h | 2 ++ src/tracefs-kprobes.c | 79 ++++++++++++++++++++++++++++++------------- 2 files changed, 58 insertions(+), 23 deletions(-)
include/tracefs.h +2 -0
@@ -217,6 +217,8 @@ void tracefs_trace_pipe_stop(struct tracefs_instance *instance);int tracefs_kprobe_raw (const char *system,const char *event,const char *addr,const char *format); +int tracefs_kretprobe_raw (const char *system,const char *event, +const char *addr,const char *format);int tracefs_kprobe_clear (bool force);int tracefs_kprobe_clear_probe (const char *system,const char *event,bool force);#endif /* _TRACE_FS_H */
src/tracefs-kprobes.c +56 -23
92 lines not on this page · raw message
Signature · 1 line
2.31.1