From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH 3/3] [PATCH 3/3] tracing: Only print objcopy version warning once from recordmcount
Date: Tue, 17 Nov 2009 12:12:45 -0500 [thread overview]
Message-ID: <20091117171355.860182440@goodmis.org> (raw)
In-Reply-To: 20091117171242.761539651@goodmis.org
[-- Attachment #1: 0003-tracing-Only-print-objcopy-version-warning-once-from.patch --]
[-- Type: text/plain, Size: 2605 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
If the user has an older version of objcopy, that can not handle
converting local symbols to global and vice versa, then some
functions will not be part of the dynamic function tracer. The current
code in recordmcount.pl will print a warning in this case. Unfortunately,
there exists lots of files that may have this issue with older objcopys
and this will cause a warning for every file compiled with this
issue.
This patch solves this overwhelming output by creating a
.tmp_quiet_recordmcount file on the first instance the warning is
encountered. The warning will not print if this file exists.
The temp file is deleted at the beginning of the compile to ensure that
the warning will happen once again on new compiles (because the issue
is still present).
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
Makefile | 1 +
scripts/recordmcount.pl | 12 ++++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 9425d1d..1c949ac 100644
--- a/Makefile
+++ b/Makefile
@@ -379,6 +379,7 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exc
PHONY += scripts_basic
scripts_basic:
$(Q)$(MAKE) $(build)=scripts/basic
+ $(Q)rm -f .tmp_quiet_recordmcount
# To avoid any implicit rule to kick in, define an empty command.
scripts/basic/%: scripts_basic ;
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index a4e2435..f0d1445 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -162,6 +162,11 @@ 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
+# Shut up recordmcount if user has older objcopy
+my $quiet_recordmcount = ".tmp_quiet_recordmcount";
+my $print_warning = 1;
+$print_warning = 0 if ( -f $quiet_recordmcount);
+
##
# check_objcopy - whether objcopy supports --globalize-symbols
#
@@ -179,10 +184,13 @@ sub check_objcopy
}
close (IN);
- if (!$can_use_local) {
+ if (!$can_use_local && $print_warning) {
print STDERR "WARNING: could not find objcopy version or version " .
"is less than 2.17.\n" .
- "\tLocal function references is disabled.\n";
+ "\tLocal function references are disabled.\n";
+ open (QUIET, ">$quiet_recordmcount");
+ printf QUIET "Disables the warning from recordmcount.pl\n";
+ close QUIET;
}
}
--
1.6.5
next prev parent reply other threads:[~2009-11-17 17:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-17 17:12 [PATCH 0/3] [GIT PULL] tracing: various fixes Steven Rostedt
2009-11-17 17:12 ` [PATCH 1/3] [PATCH 1/3] ring-buffer: Move access to commit_page up into function used Steven Rostedt
2009-11-17 17:12 ` [PATCH 2/3] [PATCH 2/3] tracing: Prevent build warning: ftrace_graph_buf defined but not used Steven Rostedt
2009-11-17 17:12 ` Steven Rostedt [this message]
2009-11-17 17:19 ` [PATCH 0/3] [GIT PULL] tracing: various fixes 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=20091117171355.860182440@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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