mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-13 20:05:31 +00:00
8214522: Last runtime locking issues for concurrent class unloading
Reviewed-by: coleenp, pliden
This commit is contained in:
parent
9c22151345
commit
cb1aebae6e
@ -583,7 +583,6 @@ void ClassLoaderDataGraph::clean_module_and_package_info() {
|
||||
}
|
||||
|
||||
void ClassLoaderDataGraph::purge() {
|
||||
assert_locked_or_safepoint(ClassLoaderDataGraph_lock);
|
||||
ClassLoaderData* list = _unloading;
|
||||
_unloading = NULL;
|
||||
ClassLoaderData* next = list;
|
||||
|
||||
@ -235,7 +235,7 @@ void Dictionary::clean_cached_protection_domains(DictionaryEntry* probe) {
|
||||
|
||||
|
||||
void Dictionary::do_unloading() {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
|
||||
assert_locked_or_safepoint(SystemDictionary_lock);
|
||||
|
||||
// The NULL class loader doesn't initiate loading classes from other class loaders
|
||||
if (loader_data() == ClassLoaderData::the_null_class_loader_data()) {
|
||||
|
||||
@ -865,6 +865,7 @@ void MetaspaceUtils::verify_metrics() {
|
||||
|
||||
// Utils to check if a pointer or range is part of a committed metaspace region.
|
||||
metaspace::VirtualSpaceNode* MetaspaceUtils::find_enclosing_virtual_space(const void* p) {
|
||||
MutexLockerEx cl(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
|
||||
VirtualSpaceNode* vsn = Metaspace::space_list()->find_enclosing_space(p);
|
||||
if (Metaspace::using_class_space() && vsn == NULL) {
|
||||
vsn = Metaspace::class_space_list()->find_enclosing_space(p);
|
||||
|
||||
@ -89,7 +89,6 @@ void VirtualSpaceList::dec_virtual_space_count() {
|
||||
// nodes with a 0 container_count. Remove Metachunks in
|
||||
// the node from their respective freelists.
|
||||
void VirtualSpaceList::purge(ChunkManager* chunk_manager) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "must be called at safepoint for contains to work");
|
||||
assert_lock_strong(MetaspaceExpand_lock);
|
||||
// Don't use a VirtualSpaceListIterator because this
|
||||
// list is being changed and a straightforward use of an iterator is not safe.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user