Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8202591

Remove usage of CMSEdenChunksRecordAlways in defNewGeneration.cpp

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • None
    • hotspot
    • None
    • gc
    • b13

      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.

            stefank Stefan Karlsson
            stefank Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: