1.1 --- a/src/share/vm/memory/defNewGeneration.cpp Thu Jul 18 09:35:02 2013 -0700 1.2 +++ b/src/share/vm/memory/defNewGeneration.cpp Tue Jul 23 09:49:11 2013 -0700 1.3 @@ -1033,6 +1033,9 @@ 1.4 // have to use it here, as well. 1.5 HeapWord* result = eden()->par_allocate(word_size); 1.6 if (result != NULL) { 1.7 + if (CMSEdenChunksRecordAlways && _next_gen != NULL) { 1.8 + _next_gen->sample_eden_chunk(); 1.9 + } 1.10 return result; 1.11 } 1.12 do { 1.13 @@ -1063,13 +1066,19 @@ 1.14 // circular dependency at compile time. 1.15 if (result == NULL) { 1.16 result = allocate_from_space(word_size); 1.17 + } else if (CMSEdenChunksRecordAlways && _next_gen != NULL) { 1.18 + _next_gen->sample_eden_chunk(); 1.19 } 1.20 return result; 1.21 } 1.22 1.23 HeapWord* DefNewGeneration::par_allocate(size_t word_size, 1.24 bool is_tlab) { 1.25 - return eden()->par_allocate(word_size); 1.26 + HeapWord* res = eden()->par_allocate(word_size); 1.27 + if (CMSEdenChunksRecordAlways && _next_gen != NULL) { 1.28 + _next_gen->sample_eden_chunk(); 1.29 + } 1.30 + return res; 1.31 } 1.32 1.33 void DefNewGeneration::gc_prologue(bool full) {