public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* gcc stop compiling a large stap generated c file
@ 2006-10-11  9:16 Li Guanglei
  2006-10-11 13:45 ` Frank Ch. Eigler
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Li Guanglei @ 2006-10-11  9:16 UTC (permalink / raw)
  To: systemtap

[-- Attachment #1: Type: text/plain, Size: 851 bytes --]

Hi,

   I tried:  stap -e 'probe addevent.* {}' -bM -v
on ppc64/RHEL4u4/gcc-3.4.6,  and got a lot of errors of "operand out 
of range".

   the generated c file is really big:

root:/tmp/stapRl4mJy> ll -h
total 7.5M
-rw-r--r--  1 root root  128 Oct  9 17:53 Makefile
-rw-r--r--  1 root root 6.3M Oct  9 17:53 stap_11644.c
-rw-r--r--  1 root root 714K Oct  9 17:53 stap-symbols.h
-rw-r--r--  1 root root 527K Oct  9 17:53 symbols.sorted

   I searched gcc bugzilla, and found someone reported the same kind 
of error on gcc 4.1:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28904

   I think it's common for SystemTap to generate a large c file if the 
number of probes and functions turned on is big. I tried on i386 and 
it doesn't have this error. Does anyone know if there is any 
alternative to avoid such error for ppc64?

   thanks.

- Guanglei


[-- Attachment #2: gcc.err --]
[-- Type: text/plain, Size: 1977 bytes --]

Running grep " [tT] " /proc/kallsyms | sort -k 1,8 -s -o /tmp/stapRl4mJy/symbols.sorted
Pass 3: translated to C into "/tmp/stapRl4mJy/stap_11644.c" in 1180usr/200sys/1614real ms.
Running make -C "/lib/modules/2.6.17.9/build" M="/tmp/stapRl4mJy" modules V=1
make: Entering directory `/usr/src/linux-2.6.17.9'
mkdir -p /tmp/stapRl4mJy/.tmp_versions
rm -f /tmp/stapRl4mJy/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/stapRl4mJy
  gcc -m64 -Wp,-MD,/tmp/stapRl4mJy/.stap_11644.o.d  -nostdinc -isystem /usr/lib/gcc/ppc64-redhat-linux/3.4.6/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h  -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -msoft-float -pipe -mminimal-toc -mtraceback=none  -mcall-aixdesc -mtune=power4 -mno-altivec -funit-at-a-time -mstring -Wa,-maltivec -Wdeclaration-after-statement  -freorder-blocks -Wno-unused -Werror -I"/usr/local/share/systemtap/runtime"   -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(stap_11644)"  -D"KBUILD_MODNAME=KBUILD_STR(stap_11644)" -c -o /tmp/stapRl4mJy/.tmp_stap_11644.o /tmp/stapRl4mJy/stap_11644.c
{standard input}: Assembler messages:
{standard input}:642879: Error: operand out of range (0x0000000000008000 is not between 0xffffffffffff8000 and 0x0000000000007fff)
{standard input}:642895: Error: operand out of range (0x0000000000008008 is not between 0xffffffffffff8000 and 0x0000000000007fff)
{standard input}:643196: Error: operand out of range (0x0000000000008018 is not between 0xffffffffffff8000 and 0x0000000000007fff)
{standard input}:643197: Error: operand out of range (0x0000000000008010 is not between 0xffffffffffff8000 and 0x0000000000007fff)
{standard input}:643284: Error: operand out of range (0x0000000000008020 is not between 0xffffffffffff8000 and 0x0000000000007fff)
{standard input}:643300: Error: operand out of range (0x0000000000008028 is not between 0xffffffffffff8000 and 0x0000000000007fff)
...

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

* Re: gcc stop compiling a large stap generated c file
  2006-10-11  9:16 gcc stop compiling a large stap generated c file Li Guanglei
@ 2006-10-11 13:45 ` Frank Ch. Eigler
  2006-10-11 14:34 ` Vara Prasad
  2006-10-11 14:45 ` Mike Mason
  2 siblings, 0 replies; 5+ messages in thread
From: Frank Ch. Eigler @ 2006-10-11 13:45 UTC (permalink / raw)
  To: Li Guanglei; +Cc: systemtap

Li Guanglei <guanglei@cn.ibm.com> writes:

> [...]
>    I tried:  stap -e 'probe addevent.* {}' -bM -v
> on ppc64/RHEL4u4/gcc-3.4.6,  and got a lot of errors of "operand out
> of range".
>    the generated c file is really big: [...]
> -rw-r--r--  1 root root 6.3M Oct  9 17:53 stap_11644.c
> [...]

Before long, this will improve considerably.

- FChE

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

* Re: gcc stop compiling a large stap generated c file
  2006-10-11  9:16 gcc stop compiling a large stap generated c file Li Guanglei
  2006-10-11 13:45 ` Frank Ch. Eigler
@ 2006-10-11 14:34 ` Vara Prasad
  2006-10-13 22:56   ` Alan Modra
  2006-10-11 14:45 ` Mike Mason
  2 siblings, 1 reply; 5+ messages in thread
From: Vara Prasad @ 2006-10-11 14:34 UTC (permalink / raw)
  To: Li Guanglei; +Cc: systemtap, amodra, amodra

Looking at the gcc bug explanation from Alan looks like there is a 
limitation on the power platform hence there may not be an immediate fix 
from the compiler/linker side. Alan, please feel free to correct me if i 
am wrong. I guess that leaves us with only option to generate better 
code on our end.

Li Guanglei can you open a bug for this in the bugzilla.

Frank, can we have this bug looked at bit higher than normal priority, I 
think we should definitely fix this before RHEL 5.

Li Guanglei wrote:

> Hi,
>
>   I tried:  stap -e 'probe addevent.* {}' -bM -v
> on ppc64/RHEL4u4/gcc-3.4.6,  and got a lot of errors of "operand out 
> of range".
>
>   the generated c file is really big:
>
> root:/tmp/stapRl4mJy> ll -h
> total 7.5M
> -rw-r--r--  1 root root  128 Oct  9 17:53 Makefile
> -rw-r--r--  1 root root 6.3M Oct  9 17:53 stap_11644.c
> -rw-r--r--  1 root root 714K Oct  9 17:53 stap-symbols.h
> -rw-r--r--  1 root root 527K Oct  9 17:53 symbols.sorted
>
>   I searched gcc bugzilla, and found someone reported the same kind of 
> error on gcc 4.1:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28904
>
>   I think it's common for SystemTap to generate a large c file if the 
> number of probes and functions turned on is big. I tried on i386 and 
> it doesn't have this error. Does anyone know if there is any 
> alternative to avoid such error for ppc64?
>
>   thanks.
>
> - Guanglei
>
>------------------------------------------------------------------------
>
>Running grep " [tT] " /proc/kallsyms | sort -k 1,8 -s -o /tmp/stapRl4mJy/symbols.sorted
>Pass 3: translated to C into "/tmp/stapRl4mJy/stap_11644.c" in 1180usr/200sys/1614real ms.
>Running make -C "/lib/modules/2.6.17.9/build" M="/tmp/stapRl4mJy" modules V=1
>make: Entering directory `/usr/src/linux-2.6.17.9'
>mkdir -p /tmp/stapRl4mJy/.tmp_versions
>rm -f /tmp/stapRl4mJy/.tmp_versions/*
>make -f scripts/Makefile.build obj=/tmp/stapRl4mJy
>  gcc -m64 -Wp,-MD,/tmp/stapRl4mJy/.stap_11644.o.d  -nostdinc -isystem /usr/lib/gcc/ppc64-redhat-linux/3.4.6/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h  -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -msoft-float -pipe -mminimal-toc -mtraceback=none  -mcall-aixdesc -mtune=power4 -mno-altivec -funit-at-a-time -mstring -Wa,-maltivec -Wdeclaration-after-statement  -freorder-blocks -Wno-unused -Werror -I"/usr/local/share/systemtap/runtime"   -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(stap_11644)"  -D"KBUILD_MODNAME=KBUILD_STR(stap_11644)" -c -o /tmp/stapRl4mJy/.tmp_stap_11644.o /tmp/stapRl4mJy/stap_11644.c
>{standard input}: Assembler messages:
>{standard input}:642879: Error: operand out of range (0x0000000000008000 is not between 0xffffffffffff8000 and 0x0000000000007fff)
>{standard input}:642895: Error: operand out of range (0x0000000000008008 is not between 0xffffffffffff8000 and 0x0000000000007fff)
>{standard input}:643196: Error: operand out of range (0x0000000000008018 is not between 0xffffffffffff8000 and 0x0000000000007fff)
>{standard input}:643197: Error: operand out of range (0x0000000000008010 is not between 0xffffffffffff8000 and 0x0000000000007fff)
>{standard input}:643284: Error: operand out of range (0x0000000000008020 is not between 0xffffffffffff8000 and 0x0000000000007fff)
>{standard input}:643300: Error: operand out of range (0x0000000000008028 is not between 0xffffffffffff8000 and 0x0000000000007fff)
>...
>  
>


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

* Re: gcc stop compiling a large stap generated c file
  2006-10-11  9:16 gcc stop compiling a large stap generated c file Li Guanglei
  2006-10-11 13:45 ` Frank Ch. Eigler
  2006-10-11 14:34 ` Vara Prasad
@ 2006-10-11 14:45 ` Mike Mason
  2 siblings, 0 replies; 5+ messages in thread
From: Mike Mason @ 2006-10-11 14:45 UTC (permalink / raw)
  To: Li Guanglei; +Cc: systemtap

Li Guanglei wrote:
> Hi,
> 
>   I tried:  stap -e 'probe addevent.* {}' -bM -v
> on ppc64/RHEL4u4/gcc-3.4.6,  and got a lot of errors of "operand out of 
> range".
> 
>   the generated c file is really big:
> 
> root:/tmp/stapRl4mJy> ll -h
> total 7.5M
> -rw-r--r--  1 root root  128 Oct  9 17:53 Makefile
> -rw-r--r--  1 root root 6.3M Oct  9 17:53 stap_11644.c
> -rw-r--r--  1 root root 714K Oct  9 17:53 stap-symbols.h
> -rw-r--r--  1 root root 527K Oct  9 17:53 symbols.sorted
> 
>   I searched gcc bugzilla, and found someone reported the same kind of 
> error on gcc 4.1:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28904

This bug was seen and reported a while ago in systemtap as well: http://sources.redhat.com/bugzilla/show_bug.cgi?id=2910

- Mike


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

* Re: gcc stop compiling a large stap generated c file
  2006-10-11 14:34 ` Vara Prasad
@ 2006-10-13 22:56   ` Alan Modra
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Modra @ 2006-10-13 22:56 UTC (permalink / raw)
  To: Vara Prasad; +Cc: amodra, guanglei, systemtap





It is correct that both ppc32 and ppc64 gcc have a limitiation in the size
of their toc/got sections.  Compiling functions with a large number of
static vars will hit the limit.  Newer versions of gcc provide
-fsection-anchors which can help quite a lot.

Vara Prasad <prasadav@us.ibm.com> wrote on 12/10/2006 00:04:17:

> Looking at the gcc bug explanation from Alan looks like there is a
> limitation on the power platform hence there may not be an immediate fix
> from the compiler/linker side. Alan, please feel free to correct me if i
> am wrong. I guess that leaves us with only option to generate better
> code on our end.
>
> Li Guanglei can you open a bug for this in the bugzilla.
>
> Frank, can we have this bug looked at bit higher than normal priority, I
> think we should definitely fix this before RHEL 5.
>
> Li Guanglei wrote:
>
> > Hi,
> >
> >   I tried:  stap -e 'probe addevent.* {}' -bM -v
> > on ppc64/RHEL4u4/gcc-3.4.6,  and got a lot of errors of "operand out
> > of range".
> >
> >   the generated c file is really big:
> >
> > root:/tmp/stapRl4mJy> ll -h
> > total 7.5M
> > -rw-r--r--  1 root root  128 Oct  9 17:53 Makefile
> > -rw-r--r--  1 root root 6.3M Oct  9 17:53 stap_11644.c
> > -rw-r--r--  1 root root 714K Oct  9 17:53 stap-symbols.h
> > -rw-r--r--  1 root root 527K Oct  9 17:53 symbols.sorted
> >
> >   I searched gcc bugzilla, and found someone reported the same kind of
> > error on gcc 4.1:
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28904
> >
> >   I think it's common for SystemTap to generate a large c file if the
> > number of probes and functions turned on is big. I tried on i386 and
> > it doesn't have this error. Does anyone know if there is any
> > alternative to avoid such error for ppc64?
> >
> >   thanks.
> >
> > - Guanglei
> >
> >------------------------------------------------------------------------
> >
> >Running grep " [tT] " /proc/kallsyms | sort -k 1,8 -s -o
> /tmp/stapRl4mJy/symbols.sorted
> >Pass 3: translated to C into "/tmp/stapRl4mJy/stap_11644.c" in
> 1180usr/200sys/1614real ms.
> >Running make -C "/lib/modules/2.6.17.9/build" M="/tmp/stapRl4mJy"
modules V=1
> >make: Entering directory `/usr/src/linux-2.6.17.9'
> >mkdir -p /tmp/stapRl4mJy/.tmp_versions
> >rm -f /tmp/stapRl4mJy/.tmp_versions/*
> >make -f scripts/Makefile.build obj=/tmp/stapRl4mJy
> >  gcc -m64 -Wp,-MD,/tmp/stapRl4mJy/.stap_11644.o.d  -nostdinc -
> isystem /usr/lib/gcc/ppc64-redhat-linux/3.4.6/include -D__KERNEL__ -
> Iinclude  -include include/linux/autoconf.h  -Wall -Wundef -Wstrict-
> prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -
> fomit-frame-pointer -g -msoft-float -pipe -mminimal-toc -
> mtraceback=none  -mcall-aixdesc -mtune=power4 -mno-altivec -funit-
> at-a-time -mstring -Wa,-maltivec -Wdeclaration-after-statement  -
> freorder-blocks -Wno-unused -Werror -
> I"/usr/local/share/systemtap/runtime"   -DMODULE -D"KBUILD_STR(s)
> =#s" -D"KBUILD_BASENAME=KBUILD_STR(stap_11644)"  -
> D"KBUILD_MODNAME=KBUILD_STR(stap_11644)" -c -o /tmp/stapRl4mJy/.
> tmp_stap_11644.o /tmp/stapRl4mJy/stap_11644.c
> >{standard input}: Assembler messages:
> >{standard input}:642879: Error: operand out of range
> (0x0000000000008000 is not between 0xffffffffffff8000 and
0x0000000000007fff)
> >{standard input}:642895: Error: operand out of range
> (0x0000000000008008 is not between 0xffffffffffff8000 and
0x0000000000007fff)
> >{standard input}:643196: Error: operand out of range
> (0x0000000000008018 is not between 0xffffffffffff8000 and
0x0000000000007fff)
> >{standard input}:643197: Error: operand out of range
> (0x0000000000008010 is not between 0xffffffffffff8000 and
0x0000000000007fff)
> >{standard input}:643284: Error: operand out of range
> (0x0000000000008020 is not between 0xffffffffffff8000 and
0x0000000000007fff)
> >{standard input}:643300: Error: operand out of range
> (0x0000000000008028 is not between 0xffffffffffff8000 and
0x0000000000007fff)
> >...
> >
> >
>
>

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

end of thread, other threads:[~2006-10-13 22:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-11  9:16 gcc stop compiling a large stap generated c file Li Guanglei
2006-10-11 13:45 ` Frank Ch. Eigler
2006-10-11 14:34 ` Vara Prasad
2006-10-13 22:56   ` Alan Modra
2006-10-11 14:45 ` Mike Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).