summaryrefslogtreecommitdiffstats
path: root/kernel/trace/Kconfig
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-23 17:12:36 -0400
committerSteven Rostedt <srostedt@redhat.com>2009-03-24 23:41:06 -0400
commit493762fc534c71d11d489f872c4b4a2c61173668 (patch)
tree90f308853f26ad5334717d53b18680957aab5ff4 /kernel/trace/Kconfig
parentbac429f037f1a51a74d62bad6d1518c3be065df3 (diff)
downloadkernel-crypto-493762fc534c71d11d489f872c4b4a2c61173668.tar.gz
kernel-crypto-493762fc534c71d11d489f872c4b4a2c61173668.tar.xz
kernel-crypto-493762fc534c71d11d489f872c4b4a2c61173668.zip
tracing: move function profiler data out of function struct
Impact: reduce size of memory in function profiler The function profiler originally introduces its counters into the function records itself. There is 20 thousand different functions on a normal system, and that is adding 20 thousand counters for profiling event when not needed. A normal run of the profiler yields only a couple of thousand functions executed, depending on what is being profiled. This means we have around 18 thousand useless counters. This patch rectifies this by moving the data out of the function records used by dynamic ftrace. Data is preallocated to hold the functions when the profiling begins. Checks are made during profiling to see if more recorcds should be allocated, and they are allocated if it is safe to do so. This also removes the dependency from using dynamic ftrace, and also removes the overhead by having it enabled. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/Kconfig')
-rw-r--r--kernel/trace/Kconfig10
1 files changed, 3 insertions, 7 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 95e9ad5735d..8a4136096d7 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -379,20 +379,16 @@ config DYNAMIC_FTRACE
config FUNCTION_PROFILER
bool "Kernel function profiler"
- depends on DYNAMIC_FTRACE
+ depends on FUNCTION_TRACER
default n
help
- This option enables the kernel function profiler. When the dynamic
- function tracing is enabled, a counter is added into the function
- records used by the dynamic function tracer. A file is created in
- debugfs called function_profile_enabled which defaults to zero.
+ This option enables the kernel function profiler. A file is created
+ in debugfs called function_profile_enabled which defaults to zero.
When a 1 is echoed into this file profiling begins, and when a
zero is entered, profiling stops. A file in the trace_stats
directory called functions, that show the list of functions that
have been hit and their counters.
- This takes up around 320K more memory.
-
If in doubt, say N
config FTRACE_MCOUNT_RECORD