8227653: Add VM Global OopStorage

Replaced conditional JVMCI global storage with VM global storage.

Reviewed-by: tschatzl, lfoltan, kvn
This commit is contained in:
Kim Barrett 2019-07-18 14:57:32 -04:00
parent 1a115f9763
commit e396e38bb3
27 changed files with 60 additions and 115 deletions

View File

@ -114,6 +114,7 @@ bool SystemDictionary::_has_checkPackageAccess = false;
const int defaultProtectionDomainCacheSize = 1009;
OopStorage* SystemDictionary::_vm_global_oop_storage = NULL;
OopStorage* SystemDictionary::_vm_weak_oop_storage = NULL;
@ -1844,7 +1845,7 @@ bool SystemDictionary::do_unloading(GCTimer* gc_timer) {
return unloading_occurred;
}
void SystemDictionary::oops_do(OopClosure* f) {
void SystemDictionary::oops_do(OopClosure* f, bool include_handles) {
f->do_oop(&_java_system_loader);
f->do_oop(&_java_platform_loader);
f->do_oop(&_system_loader_lock_obj);
@ -1852,6 +1853,10 @@ void SystemDictionary::oops_do(OopClosure* f) {
// Visit extra methods
invoke_method_table()->oops_do(f);
if (include_handles) {
vm_global_oop_storage()->oops_do(f);
}
}
// CDS: scan and relocate all classes referenced by _well_known_klasses[].
@ -2893,12 +2898,22 @@ int SystemDictionaryDCmd::num_arguments() {
}
void SystemDictionary::initialize_oop_storage() {
_vm_global_oop_storage =
new OopStorage("VM Global Oop Handles",
VMGlobalAlloc_lock,
VMGlobalActive_lock);
_vm_weak_oop_storage =
new OopStorage("VM Weak Oop Handles",
VMWeakAlloc_lock,
VMWeakActive_lock);
}
OopStorage* SystemDictionary::vm_global_oop_storage() {
assert(_vm_global_oop_storage != NULL, "Uninitialized");
return _vm_global_oop_storage;
}
OopStorage* SystemDictionary::vm_weak_oop_storage() {
assert(_vm_weak_oop_storage != NULL, "Uninitialized");
return _vm_weak_oop_storage;

View File

@ -348,7 +348,9 @@ public:
static bool do_unloading(GCTimer* gc_timer);
// Applies "f->do_oop" to all root oops in the system dictionary.
static void oops_do(OopClosure* f);
// If include_handles is true (the default), then the handles in the
// storage object returned by vm_global_oop_storage() are included.
static void oops_do(OopClosure* f, bool include_handles = true);
// System loader lock
static oop system_loader_lock() { return _system_loader_lock_obj; }
@ -563,7 +565,8 @@ public:
// ProtectionDomain cache
static ProtectionDomainCacheTable* _pd_cache_table;
// VM weak OopStorage object.
// VM OopStorage objects.
static OopStorage* _vm_global_oop_storage;
static OopStorage* _vm_weak_oop_storage;
protected:
@ -621,6 +624,7 @@ public:
}
static void initialize_oop_storage();
static OopStorage* vm_global_oop_storage();
static OopStorage* vm_weak_oop_storage();
protected:

View File

@ -61,7 +61,6 @@ G1GCPhaseTimes::G1GCPhaseTimes(STWGCTimer* gc_timer, uint max_gc_threads) :
_gc_par_phases[CLDGRoots] = new WorkerDataArray<double>(max_gc_threads, "CLDG Roots (ms):");
_gc_par_phases[JVMTIRoots] = new WorkerDataArray<double>(max_gc_threads, "JVMTI Roots (ms):");
AOT_ONLY(_gc_par_phases[AOTCodeRoots] = new WorkerDataArray<double>(max_gc_threads, "AOT Root Scan (ms):");)
JVMCI_ONLY(_gc_par_phases[JVMCIRoots] = new WorkerDataArray<double>(max_gc_threads, "JVMCI Root Scan (ms):");)
_gc_par_phases[CMRefRoots] = new WorkerDataArray<double>(max_gc_threads, "CM RefProcessor Roots (ms):");
_gc_par_phases[WaitForStrongCLD] = new WorkerDataArray<double>(max_gc_threads, "Wait For Strong CLD (ms):");
_gc_par_phases[WeakCLDRoots] = new WorkerDataArray<double>(max_gc_threads, "Weak CLD Roots (ms):");
@ -563,7 +562,6 @@ const char* G1GCPhaseTimes::phase_name(GCParPhases phase) {
"CLDGRoots",
"JVMTIRoots",
AOT_ONLY("AOTCodeRoots" COMMA)
JVMCI_ONLY("JVMCIRoots" COMMA)
"CMRefRoots",
"WaitForStrongCLD",
"WeakCLDRoots",

View File

@ -56,7 +56,6 @@ class G1GCPhaseTimes : public CHeapObj<mtGC> {
CLDGRoots,
JVMTIRoots,
AOT_ONLY(AOTCodeRoots COMMA)
JVMCI_ONLY(JVMCIRoots COMMA)
CMRefRoots,
WaitForStrongCLD,
WeakCLDRoots,

View File

@ -44,9 +44,6 @@
#include "runtime/mutex.hpp"
#include "services/management.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_JVMCI
#include "jvmci/jvmci.hpp"
#endif
void G1RootProcessor::worker_has_discovered_all_strong_classes() {
assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
@ -261,15 +258,6 @@ void G1RootProcessor::process_vm_roots(G1RootClosures* closures,
}
#endif
#if INCLUDE_JVMCI
if (EnableJVMCI) {
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::JVMCIRoots, worker_i);
if (_process_strong_tasks.try_claim_task(G1RP_PS_JVMCI_oops_do)) {
JVMCI::oops_do(strong_roots);
}
}
#endif
{
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::SystemDictionaryRoots, worker_i);
if (_process_strong_tasks.try_claim_task(G1RP_PS_SystemDictionary_oops_do)) {

View File

@ -64,7 +64,6 @@ class G1RootProcessor : public StackObj {
G1RP_PS_jvmti_oops_do,
G1RP_PS_CodeCache_oops_do,
AOT_ONLY(G1RP_PS_aot_oops_do COMMA)
JVMCI_ONLY(G1RP_PS_JVMCI_oops_do COMMA)
G1RP_PS_refProcessor_oops_do,
// Leave this one last.
G1RP_PS_NumElements

View File

@ -46,9 +46,6 @@
#include "runtime/vmThread.hpp"
#include "services/management.hpp"
#include "utilities/stack.inline.hpp"
#if INCLUDE_JVMCI
#include "jvmci/jvmci.hpp"
#endif
//
// ThreadRootsMarkingTask
@ -124,12 +121,6 @@ void MarkFromRootsTask::do_it(GCTaskManager* manager, uint which) {
AOTLoader::oops_do(&mark_and_push_closure);
break;
#if INCLUDE_JVMCI
case jvmci:
JVMCI::oops_do(&mark_and_push_closure);
break;
#endif
default:
fatal("Unknown root type");
}

View File

@ -99,7 +99,6 @@ class MarkFromRootsTask : public GCTask {
system_dictionary = 7,
class_loader_data = 8,
code_cache = 9
JVMCI_ONLY(COMMA jvmci = 10)
};
private:
RootType _root_type;

View File

@ -524,7 +524,6 @@ void PSMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) {
// Do not treat nmethods as strong roots for mark/sweep, since we can unload them.
//ScavengableNMethods::scavengable_nmethods_do(CodeBlobToOopClosure(mark_and_push_closure()));
AOT_ONLY(AOTLoader::oops_do(mark_and_push_closure());)
JVMCI_ONLY(JVMCI::oops_do(mark_and_push_closure());)
}
// Flush marking stack.
@ -620,8 +619,6 @@ void PSMarkSweep::mark_sweep_phase3() {
CodeCache::blobs_do(&adjust_from_blobs);
AOT_ONLY(AOTLoader::oops_do(adjust_pointer_closure());)
JVMCI_ONLY(JVMCI::oops_do(adjust_pointer_closure());)
ref_processor()->weak_oops_do(adjust_pointer_closure());
PSScavenge::reference_processor()->weak_oops_do(adjust_pointer_closure());

View File

@ -2127,7 +2127,6 @@ void PSParallelCompact::marking_phase(ParCompactionManager* cm,
q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::class_loader_data));
q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::jvmti));
q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::code_cache));
JVMCI_ONLY(q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::jvmci));)
if (active_gc_threads > 1) {
for (uint j = 0; j < active_gc_threads; j++) {
@ -2217,8 +2216,6 @@ void PSParallelCompact::adjust_roots(ParCompactionManager* cm) {
CodeCache::blobs_do(&adjust_from_blobs);
AOT_ONLY(AOTLoader::oops_do(&oop_closure);)
JVMCI_ONLY(JVMCI::oops_do(&oop_closure);)
ref_processor()->weak_oops_do(&oop_closure);
// Roots were visited so references into the young gen in roots
// may have been scanned. Process them also.

View File

@ -379,7 +379,6 @@ bool PSScavenge::invoke_no_policy() {
q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::class_loader_data));
q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::jvmti));
q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::code_cache));
JVMCI_ONLY(q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::jvmci));)
TaskTerminator terminator(active_workers,
(TaskQueueSetSuper*) promotion_manager->stack_array_depth());

View File

@ -44,9 +44,6 @@
#include "runtime/thread.hpp"
#include "runtime/vmThread.hpp"
#include "services/management.hpp"
#if INCLUDE_JVMCI
#include "jvmci/jvmci.hpp"
#endif
//
// ScavengeRootsTask
@ -106,12 +103,6 @@ void ScavengeRootsTask::do_it(GCTaskManager* manager, uint which) {
}
break;
#if INCLUDE_JVMCI
case jvmci:
JVMCI::oops_do(&roots_closure);
break;
#endif
default:
fatal("Unknown root type");
}

View File

@ -61,7 +61,6 @@ class ScavengeRootsTask : public GCTask {
management = 7,
jvmti = 8,
code_cache = 9
JVMCI_ONLY(COMMA jvmci = 10)
};
private:
RootType _root_type;

View File

@ -860,11 +860,6 @@ void GenCollectedHeap::process_roots(StrongRootsScope* scope,
if (UseAOT && _process_strong_tasks->try_claim_task(GCH_PS_aot_oops_do)) {
AOTLoader::oops_do(strong_roots);
}
#endif
#if INCLUDE_JVMCI
if (EnableJVMCI && _process_strong_tasks->try_claim_task(GCH_PS_jvmci_oops_do)) {
JVMCI::oops_do(strong_roots);
}
#endif
if (_process_strong_tasks->try_claim_task(GCH_PS_SystemDictionary_oops_do)) {
SystemDictionary::oops_do(strong_roots);

View File

@ -114,7 +114,6 @@ protected:
GCH_PS_jvmti_oops_do,
GCH_PS_CodeCache_oops_do,
AOT_ONLY(GCH_PS_aot_oops_do COMMA)
JVMCI_ONLY(GCH_PS_jvmci_oops_do COMMA)
GCH_PS_younger_gens,
// Leave this one last.
GCH_PS_NumElements

View File

@ -52,11 +52,16 @@ void ShenandoahSerialRoot::oops_do(OopClosure* cl, uint worker_id) {
}
}
// Default the second argument for SD::oops_do.
static void system_dictionary_oops_do(OopClosure* cl) {
SystemDictionary::oops_do(cl);
}
ShenandoahSerialRoots::ShenandoahSerialRoots() :
_universe_root(&Universe::oops_do, ShenandoahPhaseTimings::UniverseRoots),
_object_synchronizer_root(&ObjectSynchronizer::oops_do, ShenandoahPhaseTimings::ObjectSynchronizerRoots),
_management_root(&Management::oops_do, ShenandoahPhaseTimings::ManagementRoots),
_system_dictionary_root(&SystemDictionary::oops_do, ShenandoahPhaseTimings::SystemDictionaryRoots),
_system_dictionary_root(&system_dictionary_oops_do, ShenandoahPhaseTimings::SystemDictionaryRoots),
_jvmti_root(&JvmtiExport::oops_do, ShenandoahPhaseTimings::JVMTIRoots) {
}

View File

@ -69,6 +69,7 @@ static const ZStatSubPhase ZSubPhaseConcurrentRootsSetup("Concurrent Roots Setup
static const ZStatSubPhase ZSubPhaseConcurrentRoots("Concurrent Roots");
static const ZStatSubPhase ZSubPhaseConcurrentRootsTeardown("Concurrent Roots Teardown");
static const ZStatSubPhase ZSubPhaseConcurrentRootsJNIHandles("Concurrent Roots JNIHandles");
static const ZStatSubPhase ZSubPhaseConcurrentRootsVMHandles("Concurrent Roots VMHandles");
static const ZStatSubPhase ZSubPhaseConcurrentRootsClassLoaderDataGraph("Concurrent Roots ClassLoaderDataGraph");
static const ZStatSubPhase ZSubPhasePauseWeakRootsSetup("Pause Weak Roots Setup");
@ -231,7 +232,8 @@ void ZRootsIterator::do_jvmti_weak_export(ZRootsIteratorClosure* cl) {
void ZRootsIterator::do_system_dictionary(ZRootsIteratorClosure* cl) {
ZStatTimer timer(ZSubPhasePauseRootsSystemDictionary);
SystemDictionary::oops_do(cl);
// Handles are processed via _vm_handles.
SystemDictionary::oops_do(cl, false /* include_handles */);
}
void ZRootsIterator::do_threads(ZRootsIteratorClosure* cl) {
@ -264,8 +266,10 @@ void ZRootsIterator::oops_do(ZRootsIteratorClosure* cl, bool visit_jvmti_weak_ex
ZConcurrentRootsIterator::ZConcurrentRootsIterator(int cld_claim) :
_jni_handles_iter(JNIHandles::global_handles()),
_vm_handles_iter(SystemDictionary::vm_global_oop_storage()),
_cld_claim(cld_claim),
_jni_handles(this),
_vm_handles(this),
_class_loader_data_graph(this) {
ZStatTimer timer(ZSubPhaseConcurrentRootsSetup);
}
@ -279,6 +283,11 @@ void ZConcurrentRootsIterator::do_jni_handles(ZRootsIteratorClosure* cl) {
_jni_handles_iter.oops_do(cl);
}
void ZConcurrentRootsIterator::do_vm_handles(ZRootsIteratorClosure* cl) {
ZStatTimer timer(ZSubPhaseConcurrentRootsVMHandles);
_vm_handles_iter.oops_do(cl);
}
void ZConcurrentRootsIterator::do_class_loader_data_graph(ZRootsIteratorClosure* cl) {
ZStatTimer timer(ZSubPhaseConcurrentRootsClassLoaderDataGraph);
CLDToOopClosure cld_cl(cl, _cld_claim);
@ -288,6 +297,7 @@ void ZConcurrentRootsIterator::do_class_loader_data_graph(ZRootsIteratorClosure*
void ZConcurrentRootsIterator::oops_do(ZRootsIteratorClosure* cl) {
ZStatTimer timer(ZSubPhaseConcurrentRoots);
_jni_handles.oops_do(cl);
_vm_handles.oops_do(cl),
_class_loader_data_graph.oops_do(cl);
}

View File

@ -112,12 +112,15 @@ public:
class ZConcurrentRootsIterator {
private:
ZOopStorageIterator _jni_handles_iter;
ZOopStorageIterator _vm_handles_iter;
int _cld_claim;
void do_jni_handles(ZRootsIteratorClosure* cl);
void do_vm_handles(ZRootsIteratorClosure* cl);
void do_class_loader_data_graph(ZRootsIteratorClosure* cl);
ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_jni_handles> _jni_handles;
ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_vm_handles> _vm_handles;
ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_class_loader_data_graph> _class_loader_data_graph;
public:

View File

@ -42,9 +42,6 @@
#include "runtime/thread.hpp"
#include "services/management.hpp"
#include "utilities/align.hpp"
#if INCLUDE_JVMCI
#include "jvmci/jvmci.hpp"
#endif
template <typename Delegate>
RootSetClosure<Delegate>::RootSetClosure(Delegate* delegate) : _delegate(delegate) {}
@ -96,7 +93,6 @@ void RootSetClosure<Delegate>::process() {
Management::oops_do(this);
StringTable::oops_do(this);
AOTLoader::oops_do(this);
JVMCI_ONLY(JVMCI::oops_do(this);)
}
template class RootSetClosure<BFSClosure>;

View File

@ -41,9 +41,6 @@
#include "runtime/vframe_hp.hpp"
#include "services/management.hpp"
#include "utilities/growableArray.hpp"
#if INCLUDE_JVMCI
#include "jvmci/jvmci.hpp"
#endif
class ReferenceLocateClosure : public OopClosure {
protected:
@ -106,7 +103,6 @@ class ReferenceToRootClosure : public StackObj {
bool do_management_roots();
bool do_string_table_roots();
bool do_aot_loader_roots();
JVMCI_ONLY(bool do_jvmci_roots();)
bool do_roots();
@ -193,15 +189,6 @@ bool ReferenceToRootClosure::do_aot_loader_roots() {
return rcl.complete();
}
#if INCLUDE_JVMCI
bool ReferenceToRootClosure::do_jvmci_roots() {
assert(!complete(), "invariant");
ReferenceLocateClosure rcl(_callback, OldObjectRoot::_jvmci, OldObjectRoot::_type_undetermined, NULL);
JVMCI::oops_do(&rcl);
return rcl.complete();
}
#endif
bool ReferenceToRootClosure::do_roots() {
assert(!complete(), "invariant");
assert(OldObjectRoot::_system_undetermined == _info._system, "invariant");
@ -252,13 +239,6 @@ bool ReferenceToRootClosure::do_roots() {
return true;
}
#if INCLUDE_JVMCI
if (do_jvmci_roots()) {
_complete = true;
return true;
}
#endif
return false;
}

View File

@ -24,7 +24,7 @@
#include "precompiled.hpp"
#include "classfile/systemDictionary.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/oopStorage.inline.hpp"
#include "gc/shared/oopStorage.hpp"
#include "jvmci/jvmci.hpp"
#include "jvmci/jvmciJavaClasses.hpp"
#include "jvmci/jvmciRuntime.hpp"
@ -58,9 +58,7 @@ void JVMCI::initialize_compiler(TRAPS) {
}
void JVMCI::initialize_globals() {
_object_handles = new OopStorage("JVMCI Global Oop Handles",
JVMCIGlobalAlloc_lock,
JVMCIGlobalActive_lock);
_object_handles = SystemDictionary::vm_global_oop_storage();
_metadata_handles = MetadataHandleBlock::allocate_block();
if (UseJVMCINativeLibrary) {
// There are two runtimes.
@ -115,12 +113,6 @@ void JVMCI::release_handle(jmetadata handle) {
_metadata_handles->chain_free_list(handle);
}
void JVMCI::oops_do(OopClosure* f) {
if (_object_handles != NULL) {
_object_handles->oops_do(f);
}
}
void JVMCI::metadata_do(void f(Metadata*)) {
if (_metadata_handles != NULL) {
_metadata_handles->metadata_do(f);

View File

@ -74,8 +74,6 @@ class JVMCI : public AllStatic {
static void metadata_do(void f(Metadata*));
static void oops_do(OopClosure* f);
static void shutdown();
static bool shutdown_called();

View File

@ -63,9 +63,6 @@
#if INCLUDE_ZGC
#include "gc/z/zGlobals.hpp"
#endif
#if INCLUDE_JVMCI
#include "jvmci/jvmci.hpp"
#endif
// JvmtiTagHashmapEntry
//
@ -3042,14 +3039,6 @@ inline bool VM_HeapWalkOperation::collect_simple_roots() {
return false;
}
#if INCLUDE_JVMCI
blk.set_kind(JVMTI_HEAP_REFERENCE_OTHER);
JVMCI::oops_do(&blk);
if (blk.stopped()) {
return false;
}
#endif
return true;
}

View File

@ -64,8 +64,8 @@ class Monitor : public CHeapObj<mtSynchronizer> {
tty = access + 2,
special = tty + 1,
suspend_resume = special + 1,
vmweak = suspend_resume + 2,
leaf = vmweak + 2,
oopstorage = suspend_resume + 2,
leaf = oopstorage + 2,
safepoint = leaf + 10,
barrier = safepoint + 1,
nonleaf = barrier + 1,

View File

@ -53,6 +53,8 @@ Mutex* JNIWeakActive_lock = NULL;
Mutex* StringTableWeakAlloc_lock = NULL;
Mutex* StringTableWeakActive_lock = NULL;
Mutex* JNIHandleBlockFreeList_lock = NULL;
Mutex* VMGlobalAlloc_lock = NULL;
Mutex* VMGlobalActive_lock = NULL;
Mutex* VMWeakAlloc_lock = NULL;
Mutex* VMWeakActive_lock = NULL;
Mutex* ResolvedMethodTableWeakAlloc_lock = NULL;
@ -161,8 +163,6 @@ Mutex* DumpTimeTable_lock = NULL;
#if INCLUDE_JVMCI
Monitor* JVMCI_lock = NULL;
Mutex* JVMCIGlobalAlloc_lock = NULL;
Mutex* JVMCIGlobalActive_lock = NULL;
#endif
@ -216,14 +216,17 @@ void mutex_init() {
def(CGC_lock , PaddedMonitor, special, true, Monitor::_safepoint_check_never); // coordinate between fore- and background GC
def(STS_lock , PaddedMonitor, leaf, true, Monitor::_safepoint_check_never);
def(VMWeakAlloc_lock , PaddedMutex , vmweak, true, Monitor::_safepoint_check_never);
def(VMWeakActive_lock , PaddedMutex , vmweak-1, true, Monitor::_safepoint_check_never);
def(VMGlobalAlloc_lock , PaddedMutex , oopstorage, true, Monitor::_safepoint_check_never);
def(VMGlobalActive_lock , PaddedMutex , oopstorage-1,true, Monitor::_safepoint_check_never);
def(StringTableWeakAlloc_lock , PaddedMutex , vmweak, true, Monitor::_safepoint_check_never);
def(StringTableWeakActive_lock , PaddedMutex , vmweak-1, true, Monitor::_safepoint_check_never);
def(VMWeakAlloc_lock , PaddedMutex , oopstorage, true, Monitor::_safepoint_check_never);
def(VMWeakActive_lock , PaddedMutex , oopstorage-1,true, Monitor::_safepoint_check_never);
def(ResolvedMethodTableWeakAlloc_lock , PaddedMutex , vmweak, true, Monitor::_safepoint_check_never);
def(ResolvedMethodTableWeakActive_lock , PaddedMutex , vmweak-1, true, Monitor::_safepoint_check_never);
def(StringTableWeakAlloc_lock , PaddedMutex , oopstorage, true, Monitor::_safepoint_check_never);
def(StringTableWeakActive_lock , PaddedMutex , oopstorage-1,true, Monitor::_safepoint_check_never);
def(ResolvedMethodTableWeakAlloc_lock , PaddedMutex , oopstorage, true, Monitor::_safepoint_check_never);
def(ResolvedMethodTableWeakActive_lock , PaddedMutex , oopstorage-1, true, Monitor::_safepoint_check_never);
def(FullGCCount_lock , PaddedMonitor, leaf, true, Monitor::_safepoint_check_never); // in support of ExplicitGCInvokesConcurrent
if (UseG1GC) {
@ -356,8 +359,6 @@ void mutex_init() {
#if INCLUDE_JVMCI
def(JVMCI_lock , PaddedMonitor, nonleaf+2, true, Monitor::_safepoint_check_always);
def(JVMCIGlobalAlloc_lock , PaddedMutex , nonleaf, true, Monitor::_safepoint_check_never);
def(JVMCIGlobalActive_lock , PaddedMutex , nonleaf-1, true, Monitor::_safepoint_check_never);
#endif
def(DumpTimeTable_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_never);
#endif // INCLUDE_CDS

View File

@ -46,6 +46,8 @@ extern Mutex* JNIWeakActive_lock; // JNI weak storage active list
extern Mutex* StringTableWeakAlloc_lock; // StringTable weak storage allocate list lock
extern Mutex* StringTableWeakActive_lock; // STringTable weak storage active list lock
extern Mutex* JNIHandleBlockFreeList_lock; // a lock on the JNI handle block free list
extern Mutex* VMGlobalAlloc_lock; // VM Global Handles storage allocate list lock
extern Mutex* VMGlobalActive_lock; // VM Global Handles storage active list lock
extern Mutex* VMWeakAlloc_lock; // VM Weak Handles storage allocate list lock
extern Mutex* VMWeakActive_lock; // VM Weak Handles storage active list lock
extern Mutex* ResolvedMethodTableWeakAlloc_lock; // ResolvedMethodTable weak storage allocate list
@ -157,8 +159,6 @@ extern Monitor* CodeHeapStateAnalytics_lock; // lock print functions against
#if INCLUDE_JVMCI
extern Monitor* JVMCI_lock; // Monitor to control initialization of JVMCI
extern Mutex* JVMCIGlobalAlloc_lock; // JVMCI global storage allocate list lock
extern Mutex* JVMCIGlobalActive_lock; // JVMCI global storage active list lock
#endif
// A MutexLocker provides mutual exclusion with respect to a given mutex

View File

@ -94,6 +94,7 @@ void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
JNIHandles::global_handles(),
JNIHandles::weak_global_handles(),
StringTable::weak_storage(),
SystemDictionary::vm_global_oop_storage(),
SystemDictionary::vm_weak_oop_storage()
};
const size_t oopstorage_count = ARRAY_SIZE(oopstorages);