From: Peter Zijlstra <peterz@infradead.org>
To: Matt Fleming <mjf@gentoo.org>
Cc: LKML <linux-kernel@vger.kernel.org>, mingo@elte.hu, rostedt@goodmis.org
Subject: Re: [PATCH] ftrace: Allow section alignment
Date: Fri, 07 Nov 2008 14:18:16 +0100 [thread overview]
Message-ID: <1226063896.2697.28.camel@twins> (raw)
In-Reply-To: <5ff4a1e50811070512v410e623ax60e8a65b169f800@mail.gmail.com>
On Fri, 2008-11-07 at 13:12 +0000, Matt Fleming wrote:
> Provide a means of aligning the __mcount_loc section.
Not that I object to the patch, but this changelog needs work.
Its wrong, it doesn't provide means, it plain does.
It doesn't tell us why.
> Signed-off-by: Matt Fleming <matthew.fleming@imgtec.com>
> ---
> scripts/recordmcount.pl | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
> index 6b9fe3e..2d0bfa1 100755
> --- a/scripts/recordmcount.pl
> +++ b/scripts/recordmcount.pl
> @@ -134,6 +134,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 $alignment; # The .align value to use for $mcount_section
>
> if ($arch eq "x86") {
> if ($bits == 64) {
> @@ -148,6 +149,7 @@ if ($arch eq "x86_64") {
> $function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:";
> $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount([+-]0x[0-9a-zA-Z]+)?\$";
> $type = ".quad";
> + $alignment = 8;
>
> # force flags for this arch
> $ld .= " -m elf_x86_64";
> @@ -160,6 +162,7 @@ if ($arch eq "x86_64") {
> $function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:";
> $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$";
> $type = ".long";
> + $alignment = 4;
>
> # force flags for this arch
> $ld .= " -m elf_i386";
> @@ -288,6 +291,7 @@ sub update_funcs
> 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.align $alignment\n";
> }
> printf FILE "\t%s %s + %d\n", $type, $ref_func, $offsets[$i] - $offset;
> }
> --
> 1.5.6.4
next prev parent reply other threads:[~2008-11-07 13:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-07 13:12 Matt Fleming
2008-11-07 13:18 ` Peter Zijlstra [this message]
2008-11-07 13:25 ` Matt Fleming
2008-11-07 13:50 ` Steven Rostedt
2008-11-07 13:29 ` Steven Rostedt
2008-11-07 13:59 ` Matt Fleming
2008-11-07 14:04 ` 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=1226063896.2697.28.camel@twins \
--to=peterz@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mjf@gentoo.org \
--cc=rostedt@goodmis.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
all inboxes | Powered by JetHome®