* Re: [PATCH 1/6]Make recordmcount destinct module compile [not found] <1231468368.10683.100.camel@sli10-desk.sh.intel.com> @ 2009-01-09 2:45 ` Steven Rostedt 2009-01-09 19:28 ` Sam Ravnborg 0 siblings, 1 reply; 5+ messages in thread From: Steven Rostedt @ 2009-01-09 2:45 UTC (permalink / raw) To: Shaohua Li; +Cc: ia64, Luck, Tony, Ingo Molnar, Sam Ravnborg, linux-kbuild [ Added Sam and linux-kbuild to the CC list ] Since this patch touches not just recordmcount.pl but also the kbuild system, I want the maintainers to be aware. Sam, this patch look OK with you, and if it does, can you ack it. Thanks, -- Steve On Fri, 9 Jan 2009, Shaohua Li wrote: > 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> > --- > scripts/Makefile.build | 9 ++++++++- > scripts/recordmcount.pl | 6 +++--- > 2 files changed, 11 insertions(+), 4 deletions(-) > > Index: linux/scripts/Makefile.build > =================================================================== > --- linux.orig/scripts/Makefile.build 2009-01-09 09:52:01.000000000 +0800 > +++ linux/scripts/Makefile.build 2009-01-09 09:52:36.000000000 +0800 > @@ -114,6 +114,7 @@ endif > # Default is built-in, unless we know otherwise > modkern_cflags := $(CFLAGS_KERNEL) > quiet_modtag := $(empty) $(empty) > +is_module := 0 > > $(real-objs-m) : modkern_cflags := $(CFLAGS_MODULE) > $(real-objs-m:.o=.i) : modkern_cflags := $(CFLAGS_MODULE) > @@ -125,6 +126,11 @@ $(real-objs-m:.o=.i) : quiet_modtag := > $(real-objs-m:.o=.s) : quiet_modtag := [M] > $(real-objs-m:.o=.lst): quiet_modtag := [M] > > +$(real-objs-m) : is_module := 1 > +$(real-objs-m:.o=.i) : is_module := 1 > +$(real-objs-m:.o=.s) : is_module := 1 > +$(real-objs-m:.o=.lst): is_module := 1 > + > $(obj-m) : quiet_modtag := [M] > > # Default for not multi-part modules > @@ -201,7 +207,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)" \ > + "$(is_module)" "$(@)"; > endif > > define rule_cc_o_c > Index: linux/scripts/recordmcount.pl > =================================================================== > --- linux.orig/scripts/recordmcount.pl 2009-01-08 16:09:59.000000000 +0800 > +++ linux/scripts/recordmcount.pl 2009-01-09 09:52:36.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 = ( > > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/6]Make recordmcount destinct module compile 2009-01-09 2:45 ` [PATCH 1/6]Make recordmcount destinct module compile Steven Rostedt @ 2009-01-09 19:28 ` Sam Ravnborg 2009-01-09 19:57 ` Steven Rostedt 0 siblings, 1 reply; 5+ messages in thread From: Sam Ravnborg @ 2009-01-09 19:28 UTC (permalink / raw) To: Steven Rostedt; +Cc: Shaohua Li, ia64, Luck, Tony, Ingo Molnar, linux-kbuild On Thu, Jan 08, 2009 at 09:45:14PM -0500, Steven Rostedt wrote: > > [ Added Sam and linux-kbuild to the CC list ] > > Since this patch touches not just recordmcount.pl but also the kbuild > system, I want the maintainers to be aware. > > Sam, this patch look OK with you, and if it does, can you ack it. > > Thanks, > > -- Steve > > > On Fri, 9 Jan 2009, Shaohua Li wrote: > > > 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> > > --- > > scripts/Makefile.build | 9 ++++++++- > > scripts/recordmcount.pl | 6 +++--- > > 2 files changed, 11 insertions(+), 4 deletions(-) > > > > Index: linux/scripts/Makefile.build > > =================================================================== > > --- linux.orig/scripts/Makefile.build 2009-01-09 09:52:01.000000000 +0800 > > +++ linux/scripts/Makefile.build 2009-01-09 09:52:36.000000000 +0800 > > @@ -114,6 +114,7 @@ endif > > # Default is built-in, unless we know otherwise > > modkern_cflags := $(CFLAGS_KERNEL) > > quiet_modtag := $(empty) $(empty) > > +is_module := 0 > > > > $(real-objs-m) : modkern_cflags := $(CFLAGS_MODULE) > > $(real-objs-m:.o=.i) : modkern_cflags := $(CFLAGS_MODULE) > > @@ -125,6 +126,11 @@ $(real-objs-m:.o=.i) : quiet_modtag := > > $(real-objs-m:.o=.s) : quiet_modtag := [M] > > $(real-objs-m:.o=.lst): quiet_modtag := [M] > > > > +$(real-objs-m) : is_module := 1 > > +$(real-objs-m:.o=.i) : is_module := 1 > > +$(real-objs-m:.o=.s) : is_module := 1 > > +$(real-objs-m:.o=.lst): is_module := 1 > > + 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 diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 5d90030..3a23239 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -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] ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/6]Make recordmcount destinct module compile 2009-01-09 19:28 ` Sam Ravnborg @ 2009-01-09 19:57 ` Steven Rostedt 2009-01-09 20:05 ` Sam Ravnborg 0 siblings, 1 reply; 5+ messages in thread From: Steven Rostedt @ 2009-01-09 19:57 UTC (permalink / raw) To: Sam Ravnborg; +Cc: Shaohua Li, ia64, Luck, Tony, Ingo Molnar, linux-kbuild 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? -- Steve > > diff --git a/scripts/Makefile.build b/scripts/Makefile.build > index 5d90030..3a23239 100644 > --- a/scripts/Makefile.build > +++ b/scripts/Makefile.build > @@ -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] > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/6]Make recordmcount destinct module compile 2009-01-09 19:57 ` Steven Rostedt @ 2009-01-09 20:05 ` Sam Ravnborg 2009-01-12 2:00 ` Shaohua Li 0 siblings, 1 reply; 5+ messages in thread From: Sam Ravnborg @ 2009-01-09 20:05 UTC (permalink / raw) To: Steven Rostedt; +Cc: Shaohua Li, ia64, Luck, Tony, Ingo Molnar, linux-kbuild 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. Sam ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/6]Make recordmcount destinct module compile 2009-01-09 20:05 ` Sam Ravnborg @ 2009-01-12 2:00 ` Shaohua Li 0 siblings, 0 replies; 5+ messages in thread From: Shaohua Li @ 2009-01-12 2:00 UTC (permalink / raw) To: Sam Ravnborg Cc: Steven Rostedt, ia64, Luck, Tony, Ingo Molnar, linux-kbuild@vger.kernel.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 = ( ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-01-12 2:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1231468368.10683.100.camel@sli10-desk.sh.intel.com>
2009-01-09 2:45 ` [PATCH 1/6]Make recordmcount destinct module compile 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 is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox