DefNewGeneration::allocate and DefNewGeneration::par_allocate both have this code:
#if INCLUDE_ALL_GCS
if (CMSEdenChunksRecordAlways && _old_gen != NULL) {
if (_old_gen != NULL) {
_old_gen->sample_eden_chunk();
}
#endif
_old_gen is TenuredGeneration when running with Serial, which uses the default sample_eden_chunk() implementation in Generation:
virtual void sample_eden_chunk() {}
_old_gen is ConcurrentMarkSweepGeneration when running with CMS, which uses:
void sample_eden_chunk() {
//Delegate to collector
return collector()->sample_eden_chunk();
}
and this is the code in CMSCollector's sample_eden_chunk:
void CMSCollector::sample_eden_chunk() {
if (CMSEdenChunksRecordAlways && _eden_chunk_array != NULL) {
Note also that CMSEdenChunksRecordAlways is always true, even when we're not running with CMS.
I propose that we get rid of the CMSEdenChunksRecordAlways check in defNewGeneration.cpp.
#if INCLUDE_ALL_GCS
if (CMSEdenChunksRecordAlways && _old_gen != NULL) {
if (_old_gen != NULL) {
_old_gen->sample_eden_chunk();
}
#endif
_old_gen is TenuredGeneration when running with Serial, which uses the default sample_eden_chunk() implementation in Generation:
virtual void sample_eden_chunk() {}
_old_gen is ConcurrentMarkSweepGeneration when running with CMS, which uses:
void sample_eden_chunk() {
//Delegate to collector
return collector()->sample_eden_chunk();
}
and this is the code in CMSCollector's sample_eden_chunk:
void CMSCollector::sample_eden_chunk() {
if (CMSEdenChunksRecordAlways && _eden_chunk_array != NULL) {
Note also that CMSEdenChunksRecordAlways is always true, even when we're not running with CMS.
I propose that we get rid of the CMSEdenChunksRecordAlways check in defNewGeneration.cpp.