From: Shaohua Li <shaohua.li@intel.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
ia64 <linux-ia64@vger.kernel.org>,
"Luck, Tony" <tony.luck@intel.com>, Ingo Molnar <mingo@elte.hu>,
"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH 1/6]Make recordmcount destinct module compile
Date: Mon, 12 Jan 2009 02:00:51 +0000 [thread overview]
Message-ID: <1231725651.5130.2.camel@sli10-desk.sh.intel.com> (raw)
In-Reply-To: <20090109200514.GA24634@uranus.ravnborg.org>
On Sat, 2009-01-10 at 04:05 +0800, Sam Ravnborg wrote:
> On Fri, Jan 09, 2009 at 02:57:38PM -0500, Steven Rostedt wrote:
> >
> > On Fri, 9 Jan 2009, Sam Ravnborg wrote:
> > > So we duplicate the cases where we identify "this .o file
> > > is used in a module".
> > > This is not good.
> > >
> > > Also there is no reason to do this for the .i, .s and .lst
> > > targets as they do not invode recordmcount.pl anyway.
> > >
> > > If your build your patch on top of the following we avoid
> > > the duplicated list.
> > >
> > > Sam
> >
> > Thanks Sam,
> >
> > Can I add this on top of Shaohua's and put your Signed-off-by, as well
> > as an Acked-by on Shaohua's?
>
> My patch was made on top of -linus so you
> need to use the flag in the call to recordmount.pl.
>
> Please feel free to put my Acked-by: on the patch,
> but as this does not originate from me it would be the
> wrong documentation trail to add my Sigend-off-by
> as I just gave an improvement proposal.
Ok, refreshed. Other patches don't need changes.
In IA64, module build and kernel build use different option.
Make recordmcount.pl differentiate the two cases.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
---
scripts/Makefile.build | 13 +++++++------
scripts/recordmcount.pl | 6 +++---
2 files changed, 10 insertions(+), 9 deletions(-)
Index: linux/scripts/Makefile.build
=================================--- linux.orig/scripts/Makefile.build 2009-01-09 10:51:05.000000000 +0800
+++ linux/scripts/Makefile.build 2009-01-12 09:39:25.000000000 +0800
@@ -112,13 +112,13 @@ endif
# ---------------------------------------------------------------------------
# Default is built-in, unless we know otherwise
-modkern_cflags := $(CFLAGS_KERNEL)
+modkern_cflags = $(if $(part-of-module), $(CFLAGS_MODULE), $(CFLAGS_KERNEL))
quiet_modtag := $(empty) $(empty)
-$(real-objs-m) : modkern_cflags := $(CFLAGS_MODULE)
-$(real-objs-m:.o=.i) : modkern_cflags := $(CFLAGS_MODULE)
-$(real-objs-m:.o=.s) : modkern_cflags := $(CFLAGS_MODULE)
-$(real-objs-m:.o=.lst): modkern_cflags := $(CFLAGS_MODULE)
+$(real-objs-m) : part-of-module := y
+$(real-objs-m:.o=.i) : part-of-module := y
+$(real-objs-m:.o=.s) : part-of-module := y
+$(real-objs-m:.o=.lst): part-of-module := y
$(real-objs-m) : quiet_modtag := [M]
$(real-objs-m:.o=.i) : quiet_modtag := [M]
@@ -215,7 +215,8 @@ endif
ifdef CONFIG_FTRACE_MCOUNT_RECORD
cmd_record_mcount = perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
"$(if $(CONFIG_64BIT),64,32)" \
- "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" "$(@)";
+ "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" \
+ "$(if $(part-of-module),1,0)" "$(@)";
endif
define rule_cc_o_c
Index: linux/scripts/recordmcount.pl
=================================--- linux.orig/scripts/recordmcount.pl 2009-01-09 10:45:05.000000000 +0800
+++ linux/scripts/recordmcount.pl 2009-01-12 09:48:46.000000000 +0800
@@ -100,14 +100,14 @@ $P =~ s@.*/@@g;
my $V = '0.1';
-if ($#ARGV < 6) {
- print "usage: $P arch objdump objcopy cc ld nm rm mv inputfile\n";
+if ($#ARGV < 7) {
+ print "usage: $P arch objdump objcopy cc ld nm rm mv is_module inputfile\n";
print "version: $V\n";
exit(1);
}
my ($arch, $bits, $objdump, $objcopy, $cc,
- $ld, $nm, $rm, $mv, $inputfile) = @ARGV;
+ $ld, $nm, $rm, $mv, $is_module, $inputfile) = @ARGV;
# Acceptable sections to record.
my %text_sections = (
prev parent reply other threads:[~2009-01-12 2:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-09 2:32 [PATCH 1/6]Make recordmcount destinct module compile Shaohua Li
2009-01-09 2:45 ` Steven Rostedt
2009-01-09 19:28 ` Sam Ravnborg
2009-01-09 19:57 ` Steven Rostedt
2009-01-09 20:05 ` Sam Ravnborg
2009-01-12 2:00 ` Shaohua Li [this message]
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=1231725651.5130.2.camel@sli10-desk.sh.intel.com \
--to=shaohua.li@intel.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=sam@ravnborg.org \
--cc=tony.luck@intel.com \
/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