linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next 1/2] function_graph: Add kernel-doc comments for ftrace_graph_ret_addr() function
@ 2024-06-07  8:49 Yang Li
  2024-06-07  8:49 ` [PATCH -next 2/2] ftrace: Add kernel-doc comments for unregister_ftrace_direct() function Yang Li
  2024-06-10 22:17 ` [PATCH -next 1/2] function_graph: Add kernel-doc comments for ftrace_graph_ret_addr() function Steven Rostedt
  0 siblings, 2 replies; 4+ messages in thread
From: Yang Li @ 2024-06-07  8:49 UTC (permalink / raw)
  To: rostedt, mhiramat
  Cc: mark.rutland, mathieu.desnoyers, linux-kernel, linux-trace-kernel,
	Yang Li, Abaci Robot

Added kernel-doc comments for the ftrace_graph_ret_addr() function to
improve code documentation and readability.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9299
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 kernel/trace/fgraph.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c
index a13551a023aa..4ad33e4cb8da 100644
--- a/kernel/trace/fgraph.c
+++ b/kernel/trace/fgraph.c
@@ -872,6 +872,12 @@ ftrace_graph_get_ret_stack(struct task_struct *task, int idx)
 /**
  * ftrace_graph_ret_addr - convert a potentially modified stack return address
  *			   to its original value
+ * @task: pointer to the task_struct of the task being examined
+ * @idx: pointer to a state variable, should be initialized to zero
+ *	 before the first call
+ * @ret: the current return address found on the stack
+ * @retp: pointer to the return address on the stack, ignored if
+ *	  HAVE_FUNCTION_GRAPH_RET_ADDR_PTR is not defined
  *
  * This function can be called by stack unwinding code to convert a found stack
  * return address ('ret') to its original value, in case the function graph
-- 
2.20.1.7.g153144c


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

* [PATCH -next 2/2] ftrace: Add kernel-doc comments for unregister_ftrace_direct() function
  2024-06-07  8:49 [PATCH -next 1/2] function_graph: Add kernel-doc comments for ftrace_graph_ret_addr() function Yang Li
@ 2024-06-07  8:49 ` Yang Li
  2024-06-10 22:18   ` Steven Rostedt
  2024-06-10 22:17 ` [PATCH -next 1/2] function_graph: Add kernel-doc comments for ftrace_graph_ret_addr() function Steven Rostedt
  1 sibling, 1 reply; 4+ messages in thread
From: Yang Li @ 2024-06-07  8:49 UTC (permalink / raw)
  To: rostedt, mhiramat
  Cc: mark.rutland, mathieu.desnoyers, linux-kernel, linux-trace-kernel,
	Yang Li, Abaci Robot

Added kernel-doc comments for the unregister_ftrace_direct() function to
improve code documentation and readability.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9300
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 kernel/trace/ftrace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 4aeb1183ea9f..3b0dbd55cc05 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -5988,6 +5988,8 @@ EXPORT_SYMBOL_GPL(register_ftrace_direct);
  * unregister_ftrace_direct - Remove calls to custom trampoline
  * previously registered by register_ftrace_direct for @ops object.
  * @ops: The address of the struct ftrace_ops object
+ * @addr: The address of the direct call to remove
+ * @free_filters: Boolean indicating whether to free the filters
  *
  * This is used to remove a direct calls to @addr from the nop locations
  * of the functions registered in @ops (with by ftrace_set_filter_ip
-- 
2.20.1.7.g153144c


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

* Re: [PATCH -next 1/2] function_graph: Add kernel-doc comments for ftrace_graph_ret_addr() function
  2024-06-07  8:49 [PATCH -next 1/2] function_graph: Add kernel-doc comments for ftrace_graph_ret_addr() function Yang Li
  2024-06-07  8:49 ` [PATCH -next 2/2] ftrace: Add kernel-doc comments for unregister_ftrace_direct() function Yang Li
@ 2024-06-10 22:17 ` Steven Rostedt
  1 sibling, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2024-06-10 22:17 UTC (permalink / raw)
  To: Yang Li
  Cc: mhiramat, mark.rutland, mathieu.desnoyers, linux-kernel,
	linux-trace-kernel, Abaci Robot

On Fri,  7 Jun 2024 16:49:56 +0800
Yang Li <yang.lee@linux.alibaba.com> wrote:

> Added kernel-doc comments for the ftrace_graph_ret_addr() function to
> improve code documentation and readability.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9299
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>  kernel/trace/fgraph.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c
> index a13551a023aa..4ad33e4cb8da 100644
> --- a/kernel/trace/fgraph.c
> +++ b/kernel/trace/fgraph.c
> @@ -872,6 +872,12 @@ ftrace_graph_get_ret_stack(struct task_struct *task, int idx)
>  /**
>   * ftrace_graph_ret_addr - convert a potentially modified stack return address
>   *			   to its original value
> + * @task: pointer to the task_struct of the task being examined
> + * @idx: pointer to a state variable, should be initialized to zero
> + *	 before the first call

parameter descriptions should not go across more than one line. At least
not in my code. Also, you don't need to add that it needs to be initialized
here. That belongs in the body.

And it's not a state variable. The description you got that from is wrong.

I'll go update it and give you a reported by, as the entire description
needs a rewrite.

-- Steve


> + * @ret: the current return address found on the stack
> + * @retp: pointer to the return address on the stack, ignored if
> + *	  HAVE_FUNCTION_GRAPH_RET_ADDR_PTR is not defined
>   *
>   * This function can be called by stack unwinding code to convert a found stack
>   * return address ('ret') to its original value, in case the function graph


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

* Re: [PATCH -next 2/2] ftrace: Add kernel-doc comments for unregister_ftrace_direct() function
  2024-06-07  8:49 ` [PATCH -next 2/2] ftrace: Add kernel-doc comments for unregister_ftrace_direct() function Yang Li
@ 2024-06-10 22:18   ` Steven Rostedt
  0 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2024-06-10 22:18 UTC (permalink / raw)
  To: Yang Li
  Cc: mhiramat, mark.rutland, mathieu.desnoyers, linux-kernel,
	linux-trace-kernel, Abaci Robot

On Fri,  7 Jun 2024 16:49:57 +0800
Yang Li <yang.lee@linux.alibaba.com> wrote:

> Added kernel-doc comments for the unregister_ftrace_direct() function to
> improve code documentation and readability.
> 

Someone else beat you to this.

-- Steve

> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9300
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>  kernel/trace/ftrace.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 4aeb1183ea9f..3b0dbd55cc05 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -5988,6 +5988,8 @@ EXPORT_SYMBOL_GPL(register_ftrace_direct);
>   * unregister_ftrace_direct - Remove calls to custom trampoline
>   * previously registered by register_ftrace_direct for @ops object.
>   * @ops: The address of the struct ftrace_ops object
> + * @addr: The address of the direct call to remove
> + * @free_filters: Boolean indicating whether to free the filters
>   *
>   * This is used to remove a direct calls to @addr from the nop locations
>   * of the functions registered in @ops (with by ftrace_set_filter_ip


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

end of thread, other threads:[~2024-06-10 22:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-07  8:49 [PATCH -next 1/2] function_graph: Add kernel-doc comments for ftrace_graph_ret_addr() function Yang Li
2024-06-07  8:49 ` [PATCH -next 2/2] ftrace: Add kernel-doc comments for unregister_ftrace_direct() function Yang Li
2024-06-10 22:18   ` Steven Rostedt
2024-06-10 22:17 ` [PATCH -next 1/2] function_graph: Add kernel-doc comments for ftrace_graph_ret_addr() function Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).