diff options
author | Michal Simek <monstr@monstr.eu> | 2009-12-10 08:15:44 -0500 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2009-12-14 02:44:01 -0500 |
commit | 7d241ff0567b9503d79ee775c40927d09b509f83 (patch) | |
tree | 8de1af72c5643416ee427edc7e9ff2170e0d73db /scripts | |
parent | 6d9e60ce30a1be35491c74df00aaa25d869f8a02 (diff) |
microblaze: ftrace: Add dynamic trace support
With dynamic function tracer, by default, _mcount is defined as an
"empty" function, it returns directly without any more action. When
enabling it in user-space, it will jump to a real tracing
function(ftrace_caller), and do the real job for us.
Differ from the static function tracer, dynamic function tracer provides
two functions ftrace_make_call()/ftrace_make_nop() to enable/disable the
tracing of some indicated kernel functions(set_ftrace_filter).
In the kernel version, there is only one "_mcount" string for every
kernel function, so, we just need to match this one in mcount_regex of
scripts/recordmcount.pl.
For more information please look at code and Documentation/trace folder.
Steven ACK that scripts/recordmcount.pl part.
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/recordmcount.pl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index f0d14452632b..9cf0a6fad6ba 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl | |||
@@ -295,6 +295,9 @@ if ($arch eq "x86_64") { | |||
295 | $ld .= " -m elf64_sparc"; | 295 | $ld .= " -m elf64_sparc"; |
296 | $cc .= " -m64"; | 296 | $cc .= " -m64"; |
297 | $objcopy .= " -O elf64-sparc"; | 297 | $objcopy .= " -O elf64-sparc"; |
298 | } elsif ($arch eq "microblaze") { | ||
299 | # Microblaze calls '_mcount' instead of plain 'mcount'. | ||
300 | $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$"; | ||
298 | } else { | 301 | } else { |
299 | die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD"; | 302 | die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD"; |
300 | } | 303 | } |