--- old/src/share/vm/opto/phaseX.cpp 2015-09-15 15:43:35.050997301 +0200 +++ new/src/share/vm/opto/phaseX.cpp 2015-09-15 15:43:34.882997293 +0200 @@ -783,7 +783,7 @@ //------------------------------PhaseIterGVN----------------------------------- // Initialize hash table to fresh and clean for +VerifyOpto PhaseIterGVN::PhaseIterGVN( PhaseIterGVN *igvn, const char *dummy ) : PhaseGVN(igvn,dummy), _worklist( ), - _stack(C->unique() >> 1), + _stack(C->live_nodes() >> 1), _delay_transform(false) { } @@ -800,7 +800,11 @@ // Initialize with previous PhaseGVN info from Parser PhaseIterGVN::PhaseIterGVN( PhaseGVN *gvn ) : PhaseGVN(gvn), _worklist(*C->for_igvn()), - _stack(C->unique() >> 1), +// TODO: Before incremental inlining it was allocated only once and it was fine. Now that +// the constructor is used in incremental inlining, this consumes too much memory: +// _stack(C->live_nodes() >> 1), +// So, as a band-aid, we replace this by: + _stack(C->comp_arena(), 32), _delay_transform(false) { uint max; @@ -1586,7 +1590,7 @@ _nodes.map( n->_idx, new_node ); // Flag as having been cloned // Allocate stack of size _nodes.Size()/2 to avoid frequent realloc - GrowableArray trstack(C->unique() >> 1); + GrowableArray trstack(C->live_nodes() >> 1); trstack.push(new_node); // Process children of cloned node while ( trstack.is_nonempty() ) {