linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ftrace: nuke clear_ftrace_function
@ 2018-02-02  2:14 Yisheng Xie
  2018-03-06 11:30 ` Yisheng Xie
  0 siblings, 1 reply; 4+ messages in thread
From: Yisheng Xie @ 2018-02-02  2:14 UTC (permalink / raw)
  To: rostedt, mingo; +Cc: linux-kernel, Yisheng Xie

clear_ftrace_function is not used outside of ftrace.c and is not help to
use a function, so nuke it per Steve's suggestion.

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
---
 include/linux/ftrace.h |  2 --
 kernel/trace/ftrace.c  | 13 +------------
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 9c3c9a3..15518b5 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -223,7 +223,6 @@ enum ftrace_tracing_type_t {
  */
 int register_ftrace_function(struct ftrace_ops *ops);
 int unregister_ftrace_function(struct ftrace_ops *ops);
-void clear_ftrace_function(void);
 
 extern void ftrace_stub(unsigned long a0, unsigned long a1,
 			struct ftrace_ops *op, struct pt_regs *regs);
@@ -239,7 +238,6 @@ static inline int ftrace_nr_registered_ops(void)
 {
 	return 0;
 }
-static inline void clear_ftrace_function(void) { }
 static inline void ftrace_kill(void) { }
 static inline void ftrace_free_init_mem(void) { }
 static inline void ftrace_free_mem(struct module *mod, void *start, void *end) { }
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index dabd9d1..6263a98 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -192,17 +192,6 @@ static void ftrace_pid_func(unsigned long ip, unsigned long parent_ip,
 	op->saved_func(ip, parent_ip, op, regs);
 }
 
-/**
- * clear_ftrace_function - reset the ftrace function
- *
- * This NULLs the ftrace function and in essence stops
- * tracing.  There may be lag
- */
-void clear_ftrace_function(void)
-{
-	ftrace_trace_function = ftrace_stub;
-}
-
 static void ftrace_sync(struct work_struct *work)
 {
 	/*
@@ -6691,7 +6680,7 @@ void ftrace_kill(void)
 {
 	ftrace_disabled = 1;
 	ftrace_enabled = 0;
-	clear_ftrace_function();
+	ftrace_trace_function = ftrace_stub;
 }
 
 /**
-- 
1.7.12.4

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

* Re: [PATCH] ftrace: nuke clear_ftrace_function
  2018-02-02  2:14 [PATCH] ftrace: nuke clear_ftrace_function Yisheng Xie
@ 2018-03-06 11:30 ` Yisheng Xie
  2018-03-06 22:02   ` Steven Rostedt
  0 siblings, 1 reply; 4+ messages in thread
From: Yisheng Xie @ 2018-03-06 11:30 UTC (permalink / raw)
  To: rostedt, mingo; +Cc: linux-kernel

hi Steven and all,
Ping, for month passed, do you have any comment about this patch?

Thanks & Sorry to disturb
Yisheng

On 2018/2/2 10:14, Yisheng Xie wrote:
> clear_ftrace_function is not used outside of ftrace.c and is not help to
> use a function, so nuke it per Steve's suggestion.
> 
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
> ---
>  include/linux/ftrace.h |  2 --
>  kernel/trace/ftrace.c  | 13 +------------
>  2 files changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> index 9c3c9a3..15518b5 100644
> --- a/include/linux/ftrace.h
> +++ b/include/linux/ftrace.h
> @@ -223,7 +223,6 @@ enum ftrace_tracing_type_t {
>   */
>  int register_ftrace_function(struct ftrace_ops *ops);
>  int unregister_ftrace_function(struct ftrace_ops *ops);
> -void clear_ftrace_function(void);
>  
>  extern void ftrace_stub(unsigned long a0, unsigned long a1,
>  			struct ftrace_ops *op, struct pt_regs *regs);
> @@ -239,7 +238,6 @@ static inline int ftrace_nr_registered_ops(void)
>  {
>  	return 0;
>  }
> -static inline void clear_ftrace_function(void) { }
>  static inline void ftrace_kill(void) { }
>  static inline void ftrace_free_init_mem(void) { }
>  static inline void ftrace_free_mem(struct module *mod, void *start, void *end) { }
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index dabd9d1..6263a98 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -192,17 +192,6 @@ static void ftrace_pid_func(unsigned long ip, unsigned long parent_ip,
>  	op->saved_func(ip, parent_ip, op, regs);
>  }
>  
> -/**
> - * clear_ftrace_function - reset the ftrace function
> - *
> - * This NULLs the ftrace function and in essence stops
> - * tracing.  There may be lag
> - */
> -void clear_ftrace_function(void)
> -{
> -	ftrace_trace_function = ftrace_stub;
> -}
> -
>  static void ftrace_sync(struct work_struct *work)
>  {
>  	/*
> @@ -6691,7 +6680,7 @@ void ftrace_kill(void)
>  {
>  	ftrace_disabled = 1;
>  	ftrace_enabled = 0;
> -	clear_ftrace_function();
> +	ftrace_trace_function = ftrace_stub;
>  }
>  
>  /**
> 

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

* Re: [PATCH] ftrace: nuke clear_ftrace_function
  2018-03-06 11:30 ` Yisheng Xie
@ 2018-03-06 22:02   ` Steven Rostedt
  2018-03-07  1:08     ` Yisheng Xie
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2018-03-06 22:02 UTC (permalink / raw)
  To: Yisheng Xie; +Cc: mingo, linux-kernel

On Tue, 6 Mar 2018 19:30:28 +0800
Yisheng Xie <xieyisheng1@huawei.com> wrote:

> hi Steven and all,
> Ping, for month passed, do you have any comment about this patch?

Sorry you got me in the midst of traveling and other issues.

This patch looks fine, I'll queue it up. I'm currently working on some
code so I wont be pushing anything till it's all finished.

Thanks!

-- Steve

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

* Re: [PATCH] ftrace: nuke clear_ftrace_function
  2018-03-06 22:02   ` Steven Rostedt
@ 2018-03-07  1:08     ` Yisheng Xie
  0 siblings, 0 replies; 4+ messages in thread
From: Yisheng Xie @ 2018-03-07  1:08 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: mingo, linux-kernel

Hi Steven,

On 2018/3/7 6:02, Steven Rostedt wrote:
> On Tue, 6 Mar 2018 19:30:28 +0800
> Yisheng Xie <xieyisheng1@huawei.com> wrote:
> 
>> hi Steven and all,
>> Ping, for month passed, do you have any comment about this patch?
> 
> Sorry you got me in the midst of traveling and other issues.
> 
> This patch looks fine, I'll queue it up. I'm currently working on some
> code so I wont be pushing anything till it's all finished.

Get it and thank you
Yisheng
> 
> Thanks!
> 
> -- Steve
> 
> 
> 

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

end of thread, other threads:[~2018-03-07  1:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-02  2:14 [PATCH] ftrace: nuke clear_ftrace_function Yisheng Xie
2018-03-06 11:30 ` Yisheng Xie
2018-03-06 22:02   ` Steven Rostedt
2018-03-07  1:08     ` Yisheng Xie

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).