diff mbox series

[v4,6/7] Documentation: tracing: add new type '%pd' and '%pD' for kprobe

Message ID 20240123092139.3698375-7-yebin10@huawei.com (mailing list archive)
State Superseded
Headers show
Series support '%pd' and '%pD' for print file name | expand

Commit Message

yebin (H) Jan. 23, 2024, 9:21 a.m. UTC
Similar to printk() '%pd' is for fetch dentry's name from struct dentry's
pointer, and '%pD' is for fetch file's name from struct file's pointer.

Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 Documentation/trace/kprobetrace.rst | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Masami Hiramatsu (Google) Jan. 23, 2024, 1:07 p.m. UTC | #1
On Tue, 23 Jan 2024 17:21:38 +0800
Ye Bin <yebin10@huawei.com> wrote:

> Similar to printk() '%pd' is for fetch dentry's name from struct dentry's
> pointer, and '%pD' is for fetch file's name from struct file's pointer.
> 
> Signed-off-by: Ye Bin <yebin10@huawei.com>
> ---
>  Documentation/trace/kprobetrace.rst | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst
> index bf9cecb69fc9..a1d12d65a8dc 100644
> --- a/Documentation/trace/kprobetrace.rst
> +++ b/Documentation/trace/kprobetrace.rst
> @@ -58,7 +58,8 @@ Synopsis of kprobe_events
>    NAME=FETCHARG : Set NAME as the argument name of FETCHARG.
>    FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types
>  		  (u8/u16/u32/u64/s8/s16/s32/s64), hexadecimal types
> -		  (x8/x16/x32/x64), "char", "string", "ustring", "symbol", "symstr"
> +		  (x8/x16/x32/x64), VFS layer common type(%pd/%pD) for print
> +                  file name, "char", "string", "ustring", "symbol", "symstr"

Could you remove the "for print file name" here?  Since this is not the place
where such precise information describes. I think following hunk is enough to
explain it.

Thank you,

>                    and bitfield are supported.
>  
>    (\*1) only for the probe on function entry (offs == 0). Note, this argument access
> @@ -113,6 +114,9 @@ With 'symstr' type, you can filter the event with wildcard pattern of the
>  symbols, and you don't need to solve symbol name by yourself.
>  For $comm, the default type is "string"; any other type is invalid.
>  
> +VFS layer common type(%pd/%pD) is a special type, which fetches dentry's or
> +file's name from struct dentry's pointer or struct file's pointer.
> +
>  .. _user_mem_access:
>  
>  User Memory Access
> -- 
> 2.31.1
> 
>
diff mbox series

Patch

diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst
index bf9cecb69fc9..a1d12d65a8dc 100644
--- a/Documentation/trace/kprobetrace.rst
+++ b/Documentation/trace/kprobetrace.rst
@@ -58,7 +58,8 @@  Synopsis of kprobe_events
   NAME=FETCHARG : Set NAME as the argument name of FETCHARG.
   FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types
 		  (u8/u16/u32/u64/s8/s16/s32/s64), hexadecimal types
-		  (x8/x16/x32/x64), "char", "string", "ustring", "symbol", "symstr"
+		  (x8/x16/x32/x64), VFS layer common type(%pd/%pD) for print
+                  file name, "char", "string", "ustring", "symbol", "symstr"
                   and bitfield are supported.
 
   (\*1) only for the probe on function entry (offs == 0). Note, this argument access
@@ -113,6 +114,9 @@  With 'symstr' type, you can filter the event with wildcard pattern of the
 symbols, and you don't need to solve symbol name by yourself.
 For $comm, the default type is "string"; any other type is invalid.
 
+VFS layer common type(%pd/%pD) is a special type, which fetches dentry's or
+file's name from struct dentry's pointer or struct file's pointer.
+
 .. _user_mem_access:
 
 User Memory Access