2018-11-22 13:16:27

by Steven Rostedt

[permalink] [raw]
Subject: [RFC][PATCH 08/14] function_graph: Remove unused task_curr_ret_stack()

From: "Steven Rostedt (VMware)" <[email protected]>

The static inline function task_curr_ret_stack() is unused, remove it.

Signed-off-by: Steven Rostedt (VMware) <[email protected]>
---
include/linux/ftrace.h | 10 ----------
1 file changed, 10 deletions(-)

diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 477ff9412d26..5544df21a886 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -819,11 +819,6 @@ extern void ftrace_graph_init_task(struct task_struct *t);
extern void ftrace_graph_exit_task(struct task_struct *t);
extern void ftrace_graph_init_idle_task(struct task_struct *t, int cpu);

-static inline int task_curr_ret_stack(struct task_struct *t)
-{
- return t->curr_ret_stack;
-}
-
static inline void pause_graph_tracing(void)
{
atomic_inc(&current->tracing_graph_pause);
@@ -847,11 +842,6 @@ static inline int register_ftrace_graph(struct fgraph_ops *ops);
}
static inline void unregister_ftrace_graph(struct fgraph_ops *ops) { }

-static inline int task_curr_ret_stack(struct task_struct *tsk)
-{
- return -1;
-}
-
static inline unsigned long
ftrace_graph_ret_addr(struct task_struct *task, int *idx, unsigned long ret,
unsigned long *retp)
--
2.19.1




2018-11-26 07:41:02

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: [RFC][PATCH 08/14] function_graph: Remove unused task_curr_ret_stack()

On Wed, 21 Nov 2018 20:27:16 -0500
Steven Rostedt <[email protected]> wrote:

> From: "Steven Rostedt (VMware)" <[email protected]>
>
> The static inline function task_curr_ret_stack() is unused, remove it.

This looks able to be applied without this series. I think we should
apply this to for-next branch?

Reviewed-by: Masami Hiramatsu <[email protected]>

Thanks,


>
> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
> ---
> include/linux/ftrace.h | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> index 477ff9412d26..5544df21a886 100644
> --- a/include/linux/ftrace.h
> +++ b/include/linux/ftrace.h
> @@ -819,11 +819,6 @@ extern void ftrace_graph_init_task(struct task_struct *t);
> extern void ftrace_graph_exit_task(struct task_struct *t);
> extern void ftrace_graph_init_idle_task(struct task_struct *t, int cpu);
>
> -static inline int task_curr_ret_stack(struct task_struct *t)
> -{
> - return t->curr_ret_stack;
> -}
> -
> static inline void pause_graph_tracing(void)
> {
> atomic_inc(&current->tracing_graph_pause);
> @@ -847,11 +842,6 @@ static inline int register_ftrace_graph(struct fgraph_ops *ops);
> }
> static inline void unregister_ftrace_graph(struct fgraph_ops *ops) { }
>
> -static inline int task_curr_ret_stack(struct task_struct *tsk)
> -{
> - return -1;
> -}
> -
> static inline unsigned long
> ftrace_graph_ret_addr(struct task_struct *task, int *idx, unsigned long ret,
> unsigned long *retp)
> --
> 2.19.1
>
>


--
Masami Hiramatsu <[email protected]>

2018-11-26 10:03:49

by Joey Pabalinas

[permalink] [raw]
Subject: Re: [RFC][PATCH 08/14] function_graph: Remove unused task_curr_ret_stack()

On Wed, Nov 21, 2018 at 08:27:16PM -0500, Steven Rostedt wrote:
> The static inline function task_curr_ret_stack() is unused, remove it.

Just want ot make sure I understand this correctly, instead of using this
function, the convention now is to just directly assign `t->curr_ret_stack = -1`?

--
Cheers,
Joey Pabalinas


Attachments:
(No filename) (331.00 B)
signature.asc (849.00 B)
Download all attachments

2018-11-26 21:27:27

by Steven Rostedt

[permalink] [raw]
Subject: Re: [RFC][PATCH 08/14] function_graph: Remove unused task_curr_ret_stack()

On Mon, 26 Nov 2018 16:40:02 +0900
Masami Hiramatsu <[email protected]> wrote:

> On Wed, 21 Nov 2018 20:27:16 -0500
> Steven Rostedt <[email protected]> wrote:
>
> > From: "Steven Rostedt (VMware)" <[email protected]>
> >
> > The static inline function task_curr_ret_stack() is unused, remove it.
>
> This looks able to be applied without this series. I think we should
> apply this to for-next branch?

Well, my current "for-next" branch is really a "for-this" branch, as I
will be sending it up to Linus before the new merge window.

This is a clean up that can wait till the next merge window. I'll push
it to the front of the queue though, so that I can start adding some of
this for the next merge window.

>
> Reviewed-by: Masami Hiramatsu <[email protected]>
>

Thanks Masami,

-- Steve

2018-11-26 21:30:06

by Steven Rostedt

[permalink] [raw]
Subject: Re: [RFC][PATCH 08/14] function_graph: Remove unused task_curr_ret_stack()

On Mon, 26 Nov 2018 00:02:07 -1000
Joey Pabalinas <[email protected]> wrote:

> On Wed, Nov 21, 2018 at 08:27:16PM -0500, Steven Rostedt wrote:
> > The static inline function task_curr_ret_stack() is unused, remove it.
>
> Just want ot make sure I understand this correctly, instead of using this
> function, the convention now is to just directly assign `t->curr_ret_stack = -1`?
>

Not sure what you mean. This function would just return the value of
curr_ret_stack, it didn't modify it.

-- Steve

2018-11-26 21:38:16

by Joey Pabalinas

[permalink] [raw]
Subject: Re: Re: [RFC][PATCH 08/14] function_graph: Remove unused task_curr_ret_stack()

On Mon, Nov 26, 2018 at 04:27:50PM -0500, Steven Rostedt wrote:
> On Mon, 26 Nov 2018 00:02:07 -1000
> Joey Pabalinas <[email protected]> wrote:
>
> > On Wed, Nov 21, 2018 at 08:27:16PM -0500, Steven Rostedt wrote:
> > > The static inline function task_curr_ret_stack() is unused, remove it.
> >
> > Just want ot make sure I understand this correctly, instead of using this
> > function, the convention now is to just directly assign `t->curr_ret_stack = -1`?
> >
>
> Not sure what you mean. This function would just return the value of
> curr_ret_stack, it didn't modify it.
>
> -- Steve

Sorry for wording it a bit weird, I was mostly trying to figure out what
these functions were originally used for. The uses I found in the git
log were mostly things like:

ret = trace_vprintk(ip, task_curr_ret_stack(current), fmt, ap);

I guess the 2nd argument for these trace functions are implicit now and
these functions are no longer needed anywhere?

--
Cheers,
Joey Pabalinas


Attachments:
(No filename) (0.99 kB)
signature.asc (849.00 B)
Download all attachments