From: Jim Radford <radford@galvanix.net>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
Matt Fleming <mjf@gentoo.org>,
linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
Paul Mundt <lethal@linux-sh.org>, Ingo Molnar <mingo@elte.hu>,
Sam Ravnborg <sam@ravnborg.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] ftrace: mcountrecord.pl for arm
Date: Thu, 20 Nov 2008 14:04:06 -0800 [thread overview]
Message-ID: <20081120220406.GA2159@blackbean.org> (raw)
In-Reply-To: <20081120203415.251344054@goodmis.org>
Ingo and Steven,
Here is a patch on top of Steven's for recordmcount.pl on arm.
-Jim
---
From: Jim Radford <radford@galvanix.com>
Subject: ftrace: mcountrecord.pl for arm
Signed-Off-By: Jim Radford <radford@galvanix.com>
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index c5c58ac..3d16795 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -135,6 +135,7 @@ my $section_regex; # Find the start of a section
my $function_regex; # Find the name of a function
# (return offset and func name)
my $mcount_regex; # Find the call site to mcount (return offset)
+my $section_type; # Section header plus possible alignment command
my $alignment; # The .align value to use for $mcount_section
if ($arch eq "x86") {
@@ -153,6 +154,7 @@ $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\$";
+$section_type = '@progbits';
$type = ".long";
if ($arch eq "x86_64") {
@@ -191,6 +193,10 @@ if ($arch eq "x86_64") {
$type = ".quad";
}
+} elsif ($arch eq "arm") {
+ $alignment = 2;
+ $section_type = '%progbits';
+
} else {
die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD";
}
@@ -311,7 +317,7 @@ sub update_funcs
if (!$opened) {
open(FILE, ">$mcount_s") || die "can't create $mcount_s\n";
$opened = 1;
- print FILE "\t.section $mcount_section,\"a\",\@progbits\n";
+ print FILE "\t.section $mcount_section,\"a\",$section_type\n";
print FILE "\t.align $alignment\n" if (defined($alignment));
}
printf FILE "\t%s %s + %d\n", $type, $ref_func, $offsets[$i] - $offset;
next prev parent reply other threads:[~2008-11-20 22:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-20 20:34 [PATCH 0/3] ftrace: updates to recordmcount.pl script Steven Rostedt
2008-11-20 20:34 ` [PATCH 1/3] sh: dynamic ftrace support Steven Rostedt
2008-11-21 7:44 ` Paul Mundt
2008-11-21 9:00 ` Matt Fleming
2008-11-20 20:34 ` [PATCH 2/3] ftrace: add support for powerpc to recordmcount.pl script Steven Rostedt
2008-11-20 20:34 ` [PATCH 3/3] ftrace: create default variables for archs in recordmcount.pl Steven Rostedt
2008-11-20 22:04 ` Jim Radford [this message]
2008-11-20 22:11 ` [PATCH] ftrace: mcountrecord.pl for arm Jim Radford
2008-11-21 13:11 ` Russell King - ARM Linux
2008-11-21 13:31 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081120220406.GA2159@blackbean.org \
--to=radford@galvanix.net \
--cc=akpm@linux-foundation.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=linuxppc-dev@ozlabs.org \
--cc=mingo@elte.hu \
--cc=mjf@gentoo.org \
--cc=rostedt@goodmis.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).