aboutsummaryrefslogtreecommitdiffstats
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)
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 95e9ad5735d9..8a4136096d7d 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -379,20 +379,16 @@ config DYNAMIC_FTRACE
379 379
380config FUNCTION_PROFILER 380config FUNCTION_PROFILER
381 bool "Kernel function profiler" 381 bool "Kernel function profiler"
382 depends on DYNAMIC_FTRACE 382 depends on FUNCTION_TRACER
383 default n 383 default n
384 help 384 help
385 This option enables the kernel function profiler. When the dynamic 385 This option enables the kernel function profiler. A file is created
386 function tracing is enabled, a counter is added into the function 386 in debugfs called function_profile_enabled which defaults to zero.
387 records used by the dynamic function tracer. A file is created in
388 debugfs called function_profile_enabled which defaults to zero.
389 When a 1 is echoed into this file profiling begins, and when a 387 When a 1 is echoed into this file profiling begins, and when a
390 zero is entered, profiling stops. A file in the trace_stats 388 zero is entered, profiling stops. A file in the trace_stats
391 directory called functions, that show the list of functions that 389 directory called functions, that show the list of functions that
392 have been hit and their counters. 390 have been hit and their counters.
393 391
394 This takes up around 320K more memory.
395
396 If in doubt, say N 392 If in doubt, say N
397 393
398config FTRACE_MCOUNT_RECORD 394config FTRACE_MCOUNT_RECORD