From: Steven Rostedt <rostedt@goodmis.org>
To: Mike Frysinger <vapier@gentoo.org>
Cc: linux-kernel@vger.kernel.org,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
uclinux-dist-devel@blackfin.uclinux.org
Subject: Re: [PATCH] tracing: extend recordmcount to better support Blackfin mcount
Date: Wed, 11 Aug 2010 14:54:56 -0400 [thread overview]
Message-ID: <1281552896.3058.41.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1281079584-21205-1-git-send-email-vapier@gentoo.org>
On Fri, 2010-08-06 at 03:26 -0400, Mike Frysinger wrote:
> The mcount call on Blackfin systems includes some stack manipulation
> around the actual call site, so extend the build time perl script to
> support this. This way we can avoid doing the calculation at runtime.
Hmm, this might be something we could do in other archs.
You want me to pull it? or should this go via another tree?
-- Steve
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> scripts/recordmcount.pl | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
> index f3c9c0a..2c56539 100755
> --- a/scripts/recordmcount.pl
> +++ b/scripts/recordmcount.pl
> @@ -159,6 +159,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 $mcount_adjust; # Address adjustment to mcount offset
> my $alignment; # The .align value to use for $mcount_section
> my $section_type; # Section header plus possible alignment command
> my $can_use_local = 0; # If we can use local function references
> @@ -213,6 +214,7 @@ $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';
> +$mcount_adjust = 0;
> $type = ".long";
>
> if ($arch eq "x86_64") {
> @@ -351,6 +353,9 @@ if ($arch eq "x86_64") {
> } elsif ($arch eq "microblaze") {
> # Microblaze calls '_mcount' instead of plain 'mcount'.
> $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$";
> +} elsif ($arch eq "blackfin") {
> + $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s__mcount\$";
> + $mcount_adjust = -4;
> } else {
> die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD";
> }
> @@ -511,7 +516,7 @@ while (<IN>) {
> }
> # is this a call site to mcount? If so, record it to print later
> if ($text_found && /$mcount_regex/) {
> - push(@offsets, hex $1);
> + push(@offsets, (hex $1) + $mcount_adjust);
> }
> }
>
next prev parent reply other threads:[~2010-08-11 18:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-06 7:26 Mike Frysinger
2010-08-11 18:54 ` Steven Rostedt [this message]
2010-08-11 19:18 ` [Uclinux-dist-devel] " Mike Frysinger
2010-08-11 20:39 ` Steven Rostedt
2010-08-16 17:31 ` [tip:perf/urgent] tracing: Extend " tip-bot for Mike Frysinger
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=1281552896.3058.41.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=uclinux-dist-devel@blackfin.uclinux.org \
--cc=vapier@gentoo.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®