List Info

Thread: Re: precise gc?




Re: precise gc?
country flaguser name
Canada
2007-08-12 00:58:26
--- Nicolas Cannasse <ncannassemotion-twin.com> wrote:
> > I was unable to find the cause of the gcc 4.1.1
-O[123] build crash in 
> > part due to memory explosion. The neko process was
using over 2G of swap
> > space on my 512M machine. I wonder if this was due
to a failure of 
> > Boehm GC due to a bad interaction with a certain
compiler optimization 
> > in this specific version of gcc.
> 
> I think that's due to an infinite loop that's causing
too much memory 
> allocation. It doesn't happen because of the GC since
it can't be 
> reproduced by just recompiling Neko with other GCC/-O
flags.

Neko 1.6.0 compiled with gcc 4.1.1 -O[123] crashes.

However, Neko compiled with gcc 4.1.1 -O[123]
-fno-unit-at-a-time is okay.

I don't know whether this is a bug in Neko, gcc, or libgc,
but
could you please add -fno-unit-at-a-time to the Neko
Makefile?
The gcc 4.1.1 compiler is used in many Linux distros, and
it
would be nice if it built "out of the box" on
those machines.



       
____________________________________________________________
________________________
Pinpoint customers who are looking for what you sell. 
http://searchmarket
ing.yahoo.com/

-- 
Neko : One VM to run them all
(http://nekovm.org)

Re: precise gc?
country flaguser name
France
2007-08-12 03:57:45
Joe Wilson a écrit :
> --- Nicolas Cannasse <ncannassemotion-twin.com> wrote:
>>> I was unable to find the cause of the gcc 4.1.1
-O[123] build crash in 
>>> part due to memory explosion. The neko process
was using over 2G of swap
>>> space on my 512M machine. I wonder if this was
due to a failure of 
>>> Boehm GC due to a bad interaction with a
certain compiler optimization 
>>> in this specific version of gcc.
>> I think that's due to an infinite loop that's
causing too much memory 
>> allocation. It doesn't happen because of the GC
since it can't be 
>> reproduced by just recompiling Neko with other
GCC/-O flags.
> 
> Neko 1.6.0 compiled with gcc 4.1.1 -O[123] crashes.
> 
> However, Neko compiled with gcc 4.1.1 -O[123]
-fno-unit-at-a-time is okay.
> 
> I don't know whether this is a bug in Neko, gcc, or
libgc, but
> could you please add -fno-unit-at-a-time to the Neko
Makefile?
> The gcc 4.1.1 compiler is used in many Linux distros,
and it
> would be nice if it built "out of the box" on
those machines.

I'm not sure that disabling no-unit-at-a-time would be a
good idea, 
since it seems to improve several things :
http://lwn.net/Article
s/67176/

I would be more interested to know which loop in the JIT
cause the 
problem. Try to uncomment JIT_DEBUG in jit_x86.c

Best,
Nicolas


-- 
Neko : One VM to run them all
(http://nekovm.org)

Re: precise gc?
country flaguser name
United States
2007-08-12 09:57:44
On Sunday, August 12, 2007 Nicolas Cannasse wrote: 

> Joe Wilson a écrit :
>[...]
>> Neko 1.6.0 compiled with gcc 4.1.1 -O[123]
crashes.
>> 
>> However, Neko compiled with gcc 4.1.1 -O[123]
-fno-unit-at-a-time is okay.
>> 
>> I don't know whether this is a bug in Neko, gcc, or
libgc, but
>> could you please add -fno-unit-at-a-time to the
Neko Makefile?
>> The gcc 4.1.1 compiler is used in many Linux
distros, and it
>> would be nice if it built "out of the
box" on those machines.

> I'm not sure that disabling no-unit-at-a-time would be
a good idea, 
> since it seems to improve several things :
> http://lwn.net/Article
s/67176/

Maybe gcc is reordering top level elements in the build and
confusing
the gc.


http://www.gnu.org/software/gcc/gcc-4.2/changes.html
says
> The new command line option -fno-toplevel-reorder
directs GCC to emit
> top-level functions, variables, and asm statements in
the same order
> that they appear in the input file. This is intended to
support
> existing code which relies on a particular ordering
(for example, code
> which uses top-level asm statements to switch
sections). For new code,
> it is generally better to use function and variable
attributes. The
> -fno-toplevel-reorder option may be used for most cases
which
> currently use -fno-unit-at-a-time. The
-fno-unit-at-a-time option will
> be removed in some future version of GCC. If you know
of a case which
> requires -fno-unit-at-a-time which is not fixed by
> -fno-toplevel-reorder, please open a bug report.

e

--
Doug Currie
bondderry, NH, USA


--
Neko : One VM to run them all
(http://nekovm.org)

Re: precise gc?
country flaguser name
Canada
2007-08-12 16:43:52
> Neko 1.6.0 compiled with gcc 4.1.1 -O[123] crashes.
> 
> However, Neko compiled with gcc 4.1.1 -O[123]
-fno-unit-at-a-time is okay.

I just tested against gcc 4.1.2.
There is no problem building Neko 1.6.0 with gcc 4.1.2 with
-O[123].

Maybe there is a bug in gcc 4.1.1 that is exercised by Neko,

which was fixed in 4.1.2.

http://
gcc.gnu.org/gcc-4.1/changes.html#4.1.2


       
____________________________________________________________
________________________
Moody friends. Drama queens. Your life? Nope! - their life,
your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/ 


-- 
Neko : One VM to run them all
(http://nekovm.org)

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )