mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
docs: tracing: Update fprobe documentation
Update fprobe.rst for - the private entry_data argument - the return value of the entry handler - the nr_rethook_node field. Link: https://lkml.kernel.org/r/167526701579.433354.3057889264263546659.stgit@mhiramat.roam.corp.google.com Cc: Florent Revest <revest@chromium.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
committed by
Steven Rostedt (Google)
parent
87de2163a3
commit
8be098a9eb
@@ -87,14 +87,16 @@ returns as same as unregister_ftrace_function().
|
|||||||
The fprobe entry/exit handler
|
The fprobe entry/exit handler
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
The prototype of the entry/exit callback function is as follows:
|
The prototype of the entry/exit callback function are as follows:
|
||||||
|
|
||||||
.. code-block:: c
|
.. code-block:: c
|
||||||
|
|
||||||
void callback_func(struct fprobe *fp, unsigned long entry_ip, struct pt_regs *regs);
|
int entry_callback(struct fprobe *fp, unsigned long entry_ip, struct pt_regs *regs, void *entry_data);
|
||||||
|
|
||||||
Note that both entry and exit callbacks have same ptototype. The @entry_ip is
|
void exit_callback(struct fprobe *fp, unsigned long entry_ip, struct pt_regs *regs, void *entry_data);
|
||||||
saved at function entry and passed to exit handler.
|
|
||||||
|
Note that the @entry_ip is saved at function entry and passed to exit handler.
|
||||||
|
If the entry callback function returns !0, the corresponding exit callback will be cancelled.
|
||||||
|
|
||||||
@fp
|
@fp
|
||||||
This is the address of `fprobe` data structure related to this handler.
|
This is the address of `fprobe` data structure related to this handler.
|
||||||
@@ -113,6 +115,12 @@ saved at function entry and passed to exit handler.
|
|||||||
to use @entry_ip. On the other hand, in the exit_handler, the instruction
|
to use @entry_ip. On the other hand, in the exit_handler, the instruction
|
||||||
pointer of @regs is set to the currect return address.
|
pointer of @regs is set to the currect return address.
|
||||||
|
|
||||||
|
@entry_data
|
||||||
|
This is a local storage to share the data between entry and exit handlers.
|
||||||
|
This storage is NULL by default. If the user specify `exit_handler` field
|
||||||
|
and `entry_data_size` field when registering the fprobe, the storage is
|
||||||
|
allocated and passed to both `entry_handler` and `exit_handler`.
|
||||||
|
|
||||||
Share the callbacks with kprobes
|
Share the callbacks with kprobes
|
||||||
================================
|
================================
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user