Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145974
b: refs/heads/master
c: bac429f
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt committed Mar 25, 2009
1 parent 70c4a3d commit 4e176b4
Show file tree
Hide file tree
Showing 4 changed files with 335 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 425480081e936d8725f0d44b8829d699bf088c6b
refs/heads/master: bac429f037f1a51a74d62bad6d1518c3be065df3
4 changes: 4 additions & 0 deletions trunk/include/linux/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ struct dyn_ftrace {
unsigned long flags;
struct dyn_ftrace *newlist;
};
#ifdef CONFIG_FUNCTION_PROFILER
unsigned long counter;
struct hlist_node node;
#endif
struct dyn_arch_ftrace arch;
};

Expand Down
19 changes: 19 additions & 0 deletions trunk/kernel/trace/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ config FUNCTION_GRAPH_TRACER
This is done by setting the current return address on the current
task structure into a stack of calls.


config IRQSOFF_TRACER
bool "Interrupts-off Latency Tracer"
default n
Expand Down Expand Up @@ -376,6 +377,24 @@ config DYNAMIC_FTRACE
were made. If so, it runs stop_machine (stops all CPUS)
and modifies the code to jump over the call to ftrace.

config FUNCTION_PROFILER
bool "Kernel function profiler"
depends on DYNAMIC_FTRACE
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.
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
def_bool y
depends on DYNAMIC_FTRACE
Expand Down
Loading

0 comments on commit 4e176b4

Please sign in to comment.