aboutsummaryrefslogtreecommitdiff
path: root/scripts/recordmcount.pl
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2008-11-20 15:07:34 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-23 11:37:25 +0100
commitc204f7264c7de85aecd3638dc8fe07aba6d1fff5 (patch)
treecd982d0e5057548c2d881b32355c7da815865b5c /scripts/recordmcount.pl
parent42e007d0400155fbc12c5344c808889e6ae33d32 (diff)
downloadvexpress-lsk-c204f7264c7de85aecd3638dc8fe07aba6d1fff5.tar.gz
ftrace: create default variables for archs in recordmcount.pl
Impact: cleanup of recordmcount.pl Now that more architectures are being ported to the MCOUNT_RECORD method, there is no reason to have each declare their own arch specific variable if most of them share the same value. This patch creates a set of default values for the arch specific variables based off of i386. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'scripts/recordmcount.pl')
-rwxr-xr-xscripts/recordmcount.pl27
1 files changed, 11 insertions, 16 deletions
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 7ec032e3c3f..c5c58ac90c0 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -145,10 +145,17 @@ if ($arch eq "x86") {
}
}
+#
+# We base the defaults off of i386, the other archs may
+# feel free to change them in the below if statements.
+#
+$nm_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\S+)";
+$section_regex = "Disassembly of section\\s+(\\S+):";
+$function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:";
+$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$";
+$type = ".long";
+
if ($arch eq "x86_64") {
- $nm_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\S+)";
- $section_regex = "Disassembly of section\\s+(\\S+):";
- $function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:";
$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount([+-]0x[0-9a-zA-Z]+)?\$";
$type = ".quad";
$alignment = 8;
@@ -160,11 +167,6 @@ if ($arch eq "x86_64") {
$cc .= " -m64";
} elsif ($arch eq "i386") {
- $nm_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\S+)";
- $section_regex = "Disassembly of section\\s+(\\S+):";
- $function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:";
- $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$";
- $type = ".long";
$alignment = 4;
# force flags for this arch
@@ -174,11 +176,6 @@ if ($arch eq "x86_64") {
$cc .= " -m32";
} elsif ($arch eq "sh") {
- $nm_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\S+)";
- $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";
@@ -187,13 +184,11 @@ if ($arch eq "x86_64") {
} elsif ($arch eq "powerpc") {
$nm_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\.?\\S+)";
- $section_regex = "Disassembly of section\\s+(\\S+):";
$function_regex = "^([0-9a-fA-F]+)\\s+<(\\.?.*?)>:";
$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s\\.?_mcount\$";
+
if ($bits == 64) {
$type = ".quad";
- } else {
- $type = ".long";
}
} else {