From: Matt Fleming Date: Wed, 12 Nov 2008 11:11:47 +0000 (+0900) Subject: sh: dynamic ftrace support. X-Git-Tag: v2.6.29-rc1~586^2~49^3~5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0da85c09b44bfea07e63ed5324aabc7cfc8a889a;p=linux-2.6-omap-h63xx.git sh: dynamic ftrace support. First cut at dynamic ftrace support. [ Steven Rostedt - only updated the recordmcount.pl file. There are updates for PowerPC that will conflict with this, and we need to base off of these changes. ] Signed-off-by: Matt Fleming Signed-off-by: Paul Mundt Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar --- diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index eeac71c87c6..9f75438f65e 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl @@ -170,6 +170,17 @@ if ($arch eq "x86_64") { $objcopy .= " -O elf32-i386"; $cc .= " -m32"; +} elsif ($arch eq "sh") { + $section_regex = "Disassembly of section\\s+(\\S+):"; + $function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:"; + $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$"; + $type = ".long"; + + # force flags for this arch + $ld .= " -m shlelf_linux"; + $objcopy .= " -O elf32-sh-linux"; + $cc .= " -m32"; + } else { die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD"; }