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);
}
}