diff options
author | Michal Simek <monstr@monstr.eu> | 2009-11-16 10:21:13 +0100 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2009-11-24 11:44:33 +0100 |
commit | 70522259330d687fe0323203009d2d48fbd9b2a6 (patch) | |
tree | 195294992d250909a0dded0d32ba2506a047b8d6 /scripts | |
parent | ad45fb7a1a0bab97392791fde7947004b5631843 (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.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/recordmcount.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index d016c710b3af..5f556b786cd1 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl @@ -245,7 +245,6 @@ if ($arch eq "x86_64") { $ld .= " -m elf64_sparc"; $cc .= " -m64"; $objcopy .= " -O elf64-sparc"; - } elsif ($arch eq "mips") { # To enable module support, we need to enable the -mlong-calls option # of gcc for module, after using this option, we can not get the real @@ -298,7 +297,9 @@ if ($arch eq "x86_64") { "^([0-9a-fA-F]+)\\s+<(.|[^\$]L.*?|\$[^L].*?|[^\$][^L].*?)>:"; $type = ".dword"; } - +} elsif ($arch eq "microblaze") { + # Microblaze calls '_mcount' instead of plain 'mcount'. + $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$"; } else { die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD"; } |