[Lucid][PATCH] UBUNTU: Enable ftrace function profiler

Colin Ian King colin.king at canonical.com
Tue Apr 27 13:30:01 UTC 2010


On Mon, 2010-04-26 at 16:08 -0400, Chase Douglas wrote:
> SRU Justification:
> 
> Impact: Without function profiling we may have a more difficult time
> resolving performance issues.
> 
> How Addressed: The ftrace function profiler is turned on in the common
> kernel configs.
> 
> Reproduction: No ftrace function profiling is possible on current Ubuntu
> 10.04 LTS kernel. If it were, the file
> /sys/kernel/debug/tracing/function_profile_enabled would exist.
> 
> Regression Potential: Enabling this functionality is an added bonus to
> Ubuntu that should not cause any regressions. Further, regressions
> should be localized to the ftrace subsystem, which will not affect the
> vast majority of users.
> 
> =====
> 
> The ftrace framework has profiling capabilities that will be useful in
> tracking desktop responsiveness. As an example, profiling can tell us
> how many times an ISR is run, and how long the average run time is.
> 
> This option will not have any performance impact. When turned on at
> runtime, a small performance impact may be seen, and a few hundred KB
> per cpu of buffer pages will be allocated and used.
> 
> Extremely brief overview:
> 
> echo 1 > /sys/kernel/debug/tracing/function_profile_enabled
> ... run tests ...
> echo 0 > /sys/kernel/debug/tracing/function_profile_enabled
> cat /sys/kernel/debug/tracing/trace_stat/function0 (suffix: cpu #)
> 
> BugLink: http://bugs.launchpad.net/bugs/570389
> 
> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
> ---
>  debian.master/config/config.common.ports  |    2 +-
>  debian.master/config/config.common.ubuntu |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/debian.master/config/config.common.ports b/debian.master/config/config.common.ports
> index 6e1517c..10d5189 100644
> --- a/debian.master/config/config.common.ports
> +++ b/debian.master/config/config.common.ports
> @@ -1006,7 +1006,7 @@ CONFIG_FTRACE_MCOUNT_RECORD=y
>  # CONFIG_FTRACE_STARTUP_TEST is not set
>  # CONFIG_FTR_FIXUP_SELFTEST is not set
>  CONFIG_FUNCTION_GRAPH_TRACER=y
> -# CONFIG_FUNCTION_PROFILER is not set
> +CONFIG_FUNCTION_PROFILER=y
>  CONFIG_FUNCTION_TRACER=y
>  CONFIG_FUSE_FS=y
>  CONFIG_FUSION=y
> diff --git a/debian.master/config/config.common.ubuntu b/debian.master/config/config.common.ubuntu
> index bbefa4a..f5876c2 100644
> --- a/debian.master/config/config.common.ubuntu
> +++ b/debian.master/config/config.common.ubuntu
> @@ -1232,7 +1232,7 @@ CONFIG_FTRACE_NMI_ENTER=y
>  CONFIG_FUJITSU_LAPTOP=m
>  # CONFIG_FUJITSU_LAPTOP_DEBUG is not set
>  CONFIG_FUNCTION_GRAPH_TRACER=y
> -# CONFIG_FUNCTION_PROFILER is not set
> +CONFIG_FUNCTION_PROFILER=y
>  CONFIG_FUNCTION_TRACER=y
>  CONFIG_FUSE_FS=y
>  CONFIG_FUSION=y
> -- 
> 1.7.0.4
> 
> 
This does not affect run time performance until
the /sys/kernel/debug/tracing/function_profile_enabled is written to, so
I'm OK with this.

The regression potential is negligible to zero.

Acked-by: Colin King <colin.king at canonical.com>






More information about the kernel-team mailing list