Summary: | [gcc-4.1 regression?] extreme memory consumption with safe optimizations | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jeremy Huddleston (RETIRED) <eradicator> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | esqualante, fauli, jakub |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | my emerge info |
Description
Jeremy Huddleston (RETIRED)
2007-03-18 18:10:59 UTC
The preprocessed file is too big to be attached to bugzilla, so I put it here: http://dev.gentoo.org/~eradicator/execute.cpp.gcc4.1.2.pre The provided file and the given flags don't consume all memory on my system, even adding all additional flags of -O2 (from man page) don't show that leak. Interesting... Christian, can you try preprocessing the file. I just did a s/ -c / -E / on the compile command during emerge i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I.. -O2 -march=athlon64 -fomit-frame-pointer -pipe -MT execute.lo -MD -MP -MF .deps/execute.Tpo -E execute.cpp -fPIC -DPIC -o execute.pre which is actually equivalent to i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I.. -O2 -E execute.cpp -DPIC -o execute.pre pixie 2.0.2-r1 is not in the tree anymore and I had no problems with it. Is there still a need to investigate further? Yes, the current version of pixie shows the same memory consumption (as did the 1.x versions of pixie). It's a problem with gcc, I think... not pixie. Hi I also experience problems with huge memory usage during compilation. It seems it is connected with artithmetic operations, because gcc eats enormous amounts of RAM when compiling for example libqalculate, boost. Example 'ps axu' output: portage 27360 0.0 0.1 7528 1064 pts/2 SN+ 16:35 0:00 /usr/x86_64-pc-linux-gnu/gcc-bin/4.2.0/x86_64-pc-linux-gnu-g++ -ftemplate-depth-128 -march=nocona -O2 -pipe -finline-functions -Wno-inline -Wall -fPIC -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I.. -c -o ../bin.v2/libs/multi_index/test/test_update.test/gcc-4.2/release/debug-symbols-none/optimization-none/test_update.o ../libs/multi_index/test/test_update.cpp portage 27361 89.7 31.5 334808 320364 pts/2 RN+ 16:35 0:06 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.2.0/cc1plus -quiet -I.. -D_GNU_SOURCE -DBOOST_ALL_NO_LIB=1 -DNDEBUG ../libs/multi_index/test/test_update.cpp -quiet -dumpbase test_update.cpp -march=nocona -auxbase-strip ../bin.v2/libs/multi_index/test/test_update.test/gcc-4.2/release/debug-symbols-none/optimization-none/test_update.o -O2 -Wno-inline -Wall -ftemplate-depth-128 -finline-functions -fPIC -o - portage 27362 0.4 0.6 17604 6476 pts/2 SN+ 16:35 0:00 /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/../../../../x86_64-pc-linux-gnu/bin/as -Qy -o ../bin.v2/libs/multi_index/test/test_update.test/gcc-4.2/release/debug-symbols-none/optimization-none/test_update.o - g++ is using 320MB! I have core2duo and I set MAKEOPTS to "-j3", that gives 1GB RAM for compilation. I didn't investigate it much, but I can note most memory consuming packages and list them here. Created attachment 131296 [details]
my emerge info
File a new bug if this is a problem with gcc-4.3 with an example attached. |