lkml.org 
[lkml]   [2010]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 06/10] ftrace: Release the function hlist if we don't need it anymore
Frederic Weisbecker wrote:
> After we disable the function profiler, the function hashlist
> stays in memory. This is wasteful as nobody needs it anymore,
> until the next use if any.
>
> Release it when we disable the function profiler instead of
> resetting it in the next use.
>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Li Zefan <lizf@cn.fujitsu.com>
> Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---
> kernel/trace/ftrace.c | 1 +
> kernel/trace/functions_hlist.c | 61 +++++++++++++++++-----------------------
> kernel/trace/functions_hlist.h | 1 +
> 3 files changed, 28 insertions(+), 35 deletions(-)
>
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index dfd8f7c..0ded01c 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -509,6 +509,7 @@ ftrace_profile_write(struct file *filp, const char __user *ubuf,

> /*
> * unregister_ftrace_profiler calls stop_machine
> * so this acts like an synchronize_sched.
> */
> unregister_ftrace_profiler();

unluckily, when !CONFIG_DYNAMIC_FTRACE, it does not call stop_machine()
nor synchronize_sched(), bug here?

> + function_hlist_release();




\
 
 \ /
  Last update: 2010-01-25 07:47    [W:0.107 / U:4.404 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site