summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-06-13 01:03:24 -0700
committerDavid S. Miller <davem@davemloft.net>2009-06-16 04:56:53 -0700
commit9be12f9b1c4fd5f18cc82c170a32bfe1713ba76d (patch)
treed59b601e655160be8caaeb3ba755b0ad50199cc0 /scripts
parent949e82744b31b555dd6dba40758e05338f305233 (diff)
sparc64: Add proper dynamic ftrace support.
Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Steven Rostedt <rostedt@goodmis.org> Acked-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/recordmcount.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 91033e67321e..7109e2b5bc0a 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -226,6 +226,26 @@ if ($arch eq "x86_64") {
if ($is_module eq "0") {
$cc .= " -mconstant-gp";
}
+} elsif ($arch eq "sparc64") {
+ # In the objdump output there are giblets like:
+ # 0000000000000000 <igmp_net_exit-0x18>:
+ # As there's some data blobs that get emitted into the
+ # text section before the first instructions and the first
+ # real symbols. We don't want to match that, so to combat
+ # this we use '\w' so we'll match just plain symbol names,
+ # and not those that also include hex offsets inside of the
+ # '<>' brackets. Actually the generic function_regex setting
+ # could safely use this too.
+ $function_regex = "^([0-9a-fA-F]+)\\s+<(\\w*?)>:";
+
+ # Sparc64 calls '_mcount' instead of plain 'mcount'.
+ $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$";
+
+ $alignment = 8;
+ $type = ".xword";
+ $ld .= " -m elf64_sparc";
+ $cc .= " -m64";
+ $objcopy .= " -O elf64-sparc";
} else {
die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD";
}