Re: [proto] Compiling in debug mode

2011-05-13 Thread Daniel Oberhoff
Am Freitag, den 13.05.2011, 09:59 +0700 schrieb Eric Niebler:
 On 5/13/2011 5:45 AM, Bart Janssens wrote:
  Hi guys,

[..]

  Is anyone aware of
  tweaks for GCC that reduce memory usage, but still produce useful
  debug info (just using -g now, no optimization)?
 
 I'll leave this for the gcc experts.
 
  I've gotten to the point where a compile can use upwards of 1.5GB for
  a single test, resulting in much swapping, especially when compiling
  with make -j2 (which I try to remember not to do, now ;).
 
 Ouch. Do you have to use gcc? Perhaps clang might give you better results.
 

Maybe, but if you want to keep on using gcc, you can pass it some extra
options that influence its internal memory manager (there is a garbage
collector inside gcc...). These work for me:

--param ggc-min-expand=30 --param ggc-min-heapsize=8192

in effect I think it is a space/speed tradeoff, though I haven't noticed
any major slowdown.

Best

Daniel

___
proto mailing list
proto@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/proto


Re: [proto] Compiling in debug mode

2011-05-13 Thread Bart Janssens
On Fri, May 13, 2011 at 9:46 AM, Daniel Oberhoff
daniel.oberh...@fit.fraunhofer.de wrote:
 --param ggc-min-expand=30 --param ggc-min-heapsize=8192

 in effect I think it is a space/speed tradeoff, though I haven't noticed
 any major slowdown.

Thanks, these do reduce memory (somewhat), though there is a large
slowdown in my case. I'll look into upgrading to the latest proto, and
try with clang as well.

I've also googled a bit more about the problem, and found this
interesting blog post:
http://cpptruths.blogspot.com/2010/03/faster-meta-programs-using-gcc-45-and.html

Cheers,

-- 
Bart
___
proto mailing list
proto@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/proto


Re: [proto] Compiling in debug mode

2011-05-12 Thread Eric Niebler
On 5/13/2011 5:45 AM, Bart Janssens wrote:
 Hi guys,
 
 I've followed the recent discussion about compilation performance,
 it's good to know things are getting better and hopefully support for
 the new standard will help even more.

Probably, but someone needs to adapt Proto to use variadics/rvalue refs.
Patches welcome. :-)

 Currently, my main problem is not so much the compile time itself, but
 how much RAM gets used in debug mode (GCC 4.5.2 on ubuntu 11.04). I'm
 still using proto from boost 1.45, would the recent changes help
 anything in reducing RAM usage in debug mode? 

I don't think so, but I haven't tested.

 Is anyone aware of
 tweaks for GCC that reduce memory usage, but still produce useful
 debug info (just using -g now, no optimization)?

I'll leave this for the gcc experts.

 I've gotten to the point where a compile can use upwards of 1.5GB for
 a single test, resulting in much swapping, especially when compiling
 with make -j2 (which I try to remember not to do, now ;).

Ouch. Do you have to use gcc? Perhaps clang might give you better results.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com
___
proto mailing list
proto@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/proto