mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ftrace: update recordmount.pl arch changes
@ 2008-08-15 15:40 Steven Rostedt
  2008-08-15 15:42 ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2008-08-15 15:40 UTC (permalink / raw)
  To: LKML, Ingo Molnar; +Cc: Andrew Morton, Thomas Gleixner, Peter Zijlstra


Ingo,

I'm trying to keep all the arch changes in recordmcount.pl in one place.
I moved your code into that area, by adding the flags to the commands
that were passed in.

Does this change still work for you when compiling i386 on a x86_64 box?

Signed-off-by: Steven Rostedt <srostedt@redhat.com>

Index: linux-tip.git/scripts/recordmcount.pl
===================================================================
--- linux-tip.git.orig/scripts/recordmcount.pl	2008-08-15 10:54:00.000000000 -0400
+++ linux-tip.git/scripts/recordmcount.pl	2008-08-15 10:59:10.000000000 -0400
@@ -108,20 +108,6 @@
 
 my ($arch, $objdump, $objcopy, $cc, $ld, $nm, $rm, $mv, $inputfile) = @ARGV;
 
-if ($arch eq "i386") {
-  $ld = "ld -m elf_i386";
-  $objdump = "objdump -M i386";
-  $objcopy = "objcopy -O elf32-i386";
-  $cc = "gcc -m32";
-}
-
-if ($arch eq "x86_64") {
-  $ld = "ld -m elf_x86_64";
-  $objdump = "objdump -M x86-64";
-  $objcopy = "objcopy -O elf64-x86-64";
-  $cc = "gcc -m64";
-}
-
 $objdump = "objdump" if ((length $objdump) == 0);
 $objcopy = "objcopy" if ((length $objcopy) == 0);
 $cc = "gcc" if ((length $cc) == 0);
@@ -146,11 +132,25 @@
     $function_regex = "<(.*?)>:";
     $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount([+-]0x[0-9a-zA-Z]+)?\$";
     $type = ".quad";
+
+    # force flags for this arch
+    $ld .= " -m elf_x86_64";
+    $objdump .= " -M x86-64";
+    $objcopy .= " -O elf64-x86-64";
+    $cc .= " -m64";
+
 } elsif ($arch eq "i386") {
     $section_regex = "Disassembly of section";
     $function_regex = "<(.*?)>:";
     $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$";
     $type = ".long";
+
+    # force flags for this arch
+    $ld .= " -m elf_i386";
+    $objdump .= " -M i386";
+    $objcopy .= " -O elf32-i386";
+    $cc .= " -m32";
+
 } else {
     die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD";
 }


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ftrace: update recordmount.pl arch changes
  2008-08-15 15:40 [PATCH] ftrace: update recordmount.pl arch changes Steven Rostedt
@ 2008-08-15 15:42 ` Ingo Molnar
  2008-08-15 15:57   ` Steven Rostedt
  2008-08-19 18:33   ` Steven Rostedt
  0 siblings, 2 replies; 5+ messages in thread
From: Ingo Molnar @ 2008-08-15 15:42 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Andrew Morton, Thomas Gleixner, Peter Zijlstra


* Steven Rostedt <rostedt@goodmis.org> wrote:

> Ingo,
> 
> I'm trying to keep all the arch changes in recordmcount.pl in one 
> place. I moved your code into that area, by adding the flags to the 
> commands that were passed in.
> 
> Does this change still work for you when compiling i386 on a x86_64 
> box?

actually, i thought of this as a quick hack to let -tip testing 
continue. Dont we have all the proper information available in kbuild 
and should just pass that to scripts/recordmcount.pl when called - like 
we pass in things like OBJDUMP which might have cross-build overrides, 
etc.

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ftrace: update recordmount.pl arch changes
  2008-08-15 15:42 ` Ingo Molnar
@ 2008-08-15 15:57   ` Steven Rostedt
  2008-08-19 18:33   ` Steven Rostedt
  1 sibling, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2008-08-15 15:57 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML, Andrew Morton, Thomas Gleixner, Peter Zijlstra


On Fri, 15 Aug 2008, Ingo Molnar wrote:

> 
> * Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > Ingo,
> > 
> > I'm trying to keep all the arch changes in recordmcount.pl in one 
> > place. I moved your code into that area, by adding the flags to the 
> > commands that were passed in.
> > 
> > Does this change still work for you when compiling i386 on a x86_64 
> > box?
> 
> actually, i thought of this as a quick hack to let -tip testing 
> continue. Dont we have all the proper information available in kbuild 
> and should just pass that to scripts/recordmcount.pl when called - like 
> we pass in things like OBJDUMP which might have cross-build overrides, 
> etc.

OK, I'll set up one of my x86_64 boxes to compile the kernel for i386s, 
and see if I can come up with something.

The reason I did this patch, is to get the PPC patches ready to go on top.

I still need to port to ppc32 (I have 64 working).

-- Steve


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ftrace: update recordmount.pl arch changes
  2008-08-15 15:42 ` Ingo Molnar
  2008-08-15 15:57   ` Steven Rostedt
@ 2008-08-19 18:33   ` Steven Rostedt
  2008-08-20 10:47     ` Ingo Molnar
  1 sibling, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2008-08-19 18:33 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML, Andrew Morton, Thomas Gleixner, Peter Zijlstra


On Fri, 15 Aug 2008, Ingo Molnar wrote:

> 
> * Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > Ingo,
> > 
> > I'm trying to keep all the arch changes in recordmcount.pl in one 
> > place. I moved your code into that area, by adding the flags to the 
> > commands that were passed in.
> > 
> > Does this change still work for you when compiling i386 on a x86_64 
> > box?
> 
> actually, i thought of this as a quick hack to let -tip testing 
> continue. Dont we have all the proper information available in kbuild 
> and should just pass that to scripts/recordmcount.pl when called - like 
> we pass in things like OBJDUMP which might have cross-build overrides, 
> etc.

Ingo,

Could you use my updated patch. I know it is still just a work around, but 
your update broke my build.  I use distcc which passes in "distcc" as gcc. 
My distcc is self built and is not the same as the distribution gcc.

Ie, you have:

if ($arch eq "x86_64") {
  $ld = "ld -m elf_x86_64";
  $objdump = "objdump -M x86-64";
  $objcopy = "objcopy -O elf64-x86-64";
  $cc = "gcc -m64";
}

Where the $cc = "gcc" is not compatible on my system. I end up with a bad 
build that causes ftrace to fail on bootup.


-- Steve


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ftrace: update recordmount.pl arch changes
  2008-08-19 18:33   ` Steven Rostedt
@ 2008-08-20 10:47     ` Ingo Molnar
  0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2008-08-20 10:47 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Andrew Morton, Thomas Gleixner, Peter Zijlstra


* Steven Rostedt <rostedt@goodmis.org> wrote:

> On Fri, 15 Aug 2008, Ingo Molnar wrote:
> 
> > 
> > * Steven Rostedt <rostedt@goodmis.org> wrote:
> > 
> > > Ingo,
> > > 
> > > I'm trying to keep all the arch changes in recordmcount.pl in one 
> > > place. I moved your code into that area, by adding the flags to the 
> > > commands that were passed in.
> > > 
> > > Does this change still work for you when compiling i386 on a x86_64 
> > > box?
> > 
> > actually, i thought of this as a quick hack to let -tip testing 
> > continue. Dont we have all the proper information available in kbuild 
> > and should just pass that to scripts/recordmcount.pl when called - like 
> > we pass in things like OBJDUMP which might have cross-build overrides, 
> > etc.
> 
> Ingo,
> 
> Could you use my updated patch. I know it is still just a work around, but 
> your update broke my build.  I use distcc which passes in "distcc" as gcc. 
> My distcc is self built and is not the same as the distribution gcc.
> 
> Ie, you have:
> 
> if ($arch eq "x86_64") {
>   $ld = "ld -m elf_x86_64";
>   $objdump = "objdump -M x86-64";
>   $objcopy = "objcopy -O elf64-x86-64";
>   $cc = "gcc -m64";
> }
> 
> Where the $cc = "gcc" is not compatible on my system. I end up with a bad 
> build that causes ftrace to fail on bootup.

sure - applied to tip/tracing/ftrace.

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-20 10:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-15 15:40 [PATCH] ftrace: update recordmount.pl arch changes Steven Rostedt
2008-08-15 15:42 ` Ingo Molnar
2008-08-15 15:57   ` Steven Rostedt
2008-08-19 18:33   ` Steven Rostedt
2008-08-20 10:47     ` Ingo Molnar

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