JDK-8233214 : Remove runtime code not needed with CMS removed
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 14,16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-10-30
  • Updated: 2020-10-15
  • Resolved: 2020-10-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16
16 b20Fixed
Related Reports
Duplicate :  
Relates :  
Description
in classLoaderData.hpp, these (and associated code) were added for CMS:

  // Remembered sets support for the oops in the class loader data.
  bool _modified_oops;             // Card Table Equivalent (YC/CMS support)  (might be used for ParallelGC tho)
  bool _accumulated_modified_oops; // Mod Union Equivalent (CMS support)

in classLoaderDataGraph.hpp, these are for CMS:

  // CMS support.
  static ClassLoaderData* _saved_head;
  static ClassLoaderData* _saved_unloading;
  static bool _should_purge;

in safepoint.cpp, this is for CMS.  I don't think any other GCs delay purging ClassLoaderData until the next safepoint:

    if (_subtasks.try_claim_task(SafepointSynchronize::SAFEPOINT_CLEANUP_CLD_PURGE)) {
      if (ClassLoaderDataGraph::should_purge_and_reset()) {
        // CMS delays purging the CLDG until the beginning of the next safepoint and to
        // make sure concurrent sweep is done
        const char* name = "purging class loader data graph";
        EventSafepointCleanupTask event;
        TraceTime timer(name, TRACETIME_LOG(Info, safepoint, cleanup));
        ClassLoaderDataGraph::purge();

        post_safepoint_cleanup_task_event(event, safepoint_id, name);
      }
    }

Comments
Changeset: 7ec9c8ea Author: Coleen Phillimore <coleenp@openjdk.org> Date: 2020-10-09 20:46:11 +0000 URL: https://git.openjdk.java.net/jdk/commit/7ec9c8ea
09-10-2020

Reopening. There is code that the duplicated bug missed, specifically the ClassLoaderData::_accumulated_modified_oops field and the code that used it. I noticed this while debugging.
09-10-2020