* [PATCH] tracing: extend recordmcount to better support Blackfin mcount
@ 2010-08-06 7:26 Mike Frysinger
2010-08-11 18:54 ` Steven Rostedt
2010-08-16 17:31 ` [tip:perf/urgent] tracing: Extend " tip-bot for Mike Frysinger
0 siblings, 2 replies; 5+ messages in thread
From: Mike Frysinger @ 2010-08-06 7:26 UTC (permalink / raw)
To: linux-kernel, Steven Rostedt, Frederic Weisbecker, Ingo Molnar
Cc: uclinux-dist-devel
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.
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);
}
}
--
1.7.2
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] tracing: extend recordmcount to better support Blackfin mcount
2010-08-06 7:26 [PATCH] tracing: extend recordmcount to better support Blackfin mcount Mike Frysinger
@ 2010-08-11 18:54 ` Steven Rostedt
2010-08-11 19:18 ` [Uclinux-dist-devel] " Mike Frysinger
2010-08-16 17:31 ` [tip:perf/urgent] tracing: Extend " tip-bot for Mike Frysinger
1 sibling, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2010-08-11 18:54 UTC (permalink / raw)
To: Mike Frysinger
Cc: linux-kernel, Frederic Weisbecker, Ingo Molnar, uclinux-dist-devel
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);
> }
> }
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Uclinux-dist-devel] [PATCH] tracing: extend recordmcount to better support Blackfin mcount
2010-08-11 18:54 ` Steven Rostedt
@ 2010-08-11 19:18 ` Mike Frysinger
2010-08-11 20:39 ` Steven Rostedt
0 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2010-08-11 19:18 UTC (permalink / raw)
To: Steven Rostedt
Cc: Mike Frysinger, Frederic Weisbecker, Ingo Molnar, linux-kernel,
uclinux-dist-devel
On Wed, Aug 11, 2010 at 14:54, Steven Rostedt wrote:
> You want me to pull it? or should this go via another tree?
i was planning on it going through your tree ;)
-mike
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Uclinux-dist-devel] [PATCH] tracing: extend recordmcount to better support Blackfin mcount
2010-08-11 19:18 ` [Uclinux-dist-devel] " Mike Frysinger
@ 2010-08-11 20:39 ` Steven Rostedt
0 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2010-08-11 20:39 UTC (permalink / raw)
To: Mike Frysinger
Cc: Mike Frysinger, Frederic Weisbecker, Ingo Molnar, linux-kernel,
uclinux-dist-devel
On Wed, 2010-08-11 at 15:18 -0400, Mike Frysinger wrote:
> On Wed, Aug 11, 2010 at 14:54, Steven Rostedt wrote:
> > You want me to pull it? or should this go via another tree?
>
> i was planning on it going through your tree ;)
> -mike
Sure, it looks harmless. I'll pull it in and test it and if it doesn't
hurt anything on x86, I'll push it out for 2.6.36.
-- Steve
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:perf/urgent] tracing: Extend recordmcount to better support Blackfin mcount
2010-08-06 7:26 [PATCH] tracing: extend recordmcount to better support Blackfin mcount Mike Frysinger
2010-08-11 18:54 ` Steven Rostedt
@ 2010-08-16 17:31 ` tip-bot for Mike Frysinger
1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Mike Frysinger @ 2010-08-16 17:31 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, rostedt, vapier, tglx
Commit-ID: 465c6cca2668a2db2a4ffce3dca5714017873f2b
Gitweb: http://git.kernel.org/tip/465c6cca2668a2db2a4ffce3dca5714017873f2b
Author: Mike Frysinger <vapier@gentoo.org>
AuthorDate: Fri, 6 Aug 2010 03:26:24 -0400
Committer: Steven Rostedt <rostedt@goodmis.org>
CommitDate: Thu, 12 Aug 2010 10:06:51 -0400
tracing: Extend recordmcount to better support Blackfin mcount
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.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
LKML-Reference: <1281079584-21205-1-git-send-email-vapier@gentoo.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.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);
}
}
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-08-16 17:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-06 7:26 [PATCH] tracing: extend recordmcount to better support Blackfin mcount Mike Frysinger
2010-08-11 18:54 ` Steven Rostedt
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome