From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Matt Fleming <mjf@gentoo.org>,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
Sam Ravnborg <sam@ravnborg.org>,
Jim Radford <radford@galvanix.net>,
Paul Mundt <lethal@linux-sh.org>,
Jim Radford <radford@galvanix.com>,
Steven Rostedt <srostedt@redhat.com>
Subject: [PATCH 2/5] ftrace: mcountrecord.pl for arm
Date: Fri, 21 Nov 2008 15:29:34 -0500 [thread overview]
Message-ID: <20081121203100.453722807@goodmis.org> (raw)
In-Reply-To: 20081121202932.281682721@goodmis.org
[-- Attachment #1: 0002-ftrace-mcountrecord.pl-for-arm.patch --]
[-- Type: text/plain, Size: 1873 bytes --]
From: Jim Radford <radford@galvanix.com>
Arm uses %progbits instead of @progbits and requires only 4 byte alignment.
[ Thanks to Sam Ravnborg for mentioning that ARM uses %progbits ]
Signed-off-by: Jim Radford <radford@galvanix.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
scripts/recordmcount.pl | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 03b6af1..0197e2f 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -136,6 +136,7 @@ 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 $alignment; # The .align value to use for $mcount_section
+my $section_type; # Section header plus possible alignment command
if ($arch eq "x86") {
if ($bits == 64) {
@@ -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") {
@@ -192,6 +194,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";
}
@@ -312,7 +318,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;
--
1.5.6.5
--
next prev parent reply other threads:[~2008-11-21 20:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-21 20:29 [PATCH 0/5] ftrace: recordmcount for sh and arm, plus permanent disable API Steven Rostedt
2008-11-21 20:29 ` [PATCH 1/5] ftrace: Specify $alignment for sh architecture Steven Rostedt
2008-11-21 20:29 ` Steven Rostedt [this message]
2008-11-21 20:29 ` [PATCH 3/5] ring-buffer: add tracing_off_permanent Steven Rostedt
2008-11-21 20:29 ` [PATCH 4/5] ftrace: add ftrace_off_permanent Steven Rostedt
2008-11-21 20:29 ` [PATCH 5/5] trace: fix compiler warning in branch profiler Steven Rostedt
2008-11-23 10:51 ` [PATCH 0/5] ftrace: recordmcount for sh and arm, plus permanent disable API Ingo Molnar
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=20081121203100.453722807@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mingo@elte.hu \
--cc=mjf@gentoo.org \
--cc=radford@galvanix.com \
--cc=radford@galvanix.net \
--cc=sam@ravnborg.org \
--cc=srostedt@redhat.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.