Re: cc1plus invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0

From: Justin P. Mattock
Date: Fri Nov 06 2009 - 16:21:44 EST


Dave Korn wrote:
Justin Mattock wrote:


==1830== Command: c++ -o jsxml.o -c -DOSTYPE="Linux2.6" -DOSARCH=Linux

Ah, you're running it on the "c++" utility and it's reporting the stats for
that, but how it works is that "c++" (and "gcc", "g++", et al) is just a
driver, that parses the command line arguments and shells out to the actual
compiler ("cc1plus"), assembler and linker to get them to do all the work.

If you add "-v --save-temps" to the c++ invocation, it'll show you the
separate command lines it executes for the subprograms; the first invocation
will be of cc1plus, using the -E flag to generate the preprocessed source into
a .ii file, it's the second invocation you want, the one which uses the
"-fpreprocessed" flag and names the .ii file as input, which is the one that
actually then compiles the pre-processed source into assembly. For fuller
explanation, see the GCC wiki:

http://gcc.gnu.org/wiki/DebuggingGCC

cheers,
DaveK



o.k. after some reading and some experimenting,
I finally got firefox to compile all the way without a
memory leak..
here's what I found:
using the default .mozconfig I see during compiling there
is a -O3 in the CFLAGS(mozilla default optimization)
When using my optimization I use -O2
by mistake I accidentally forgot to add the -O2 while
tweaking my .mozconfig for a right CFLAGS to use for
debugging, in doing so firefox compiled all the way.

So using a custom CFLAGS in mozconfig and leaving out
-O* works..

Any ideas what might be happening here?

Justin P. Mattock
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/