mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
8268778: CDS check_excluded_classes needs DumpTimeTable_lock
Reviewed-by: minqi, ccheung
(cherry picked from commit 0ebf8aa9d7)
This commit is contained in:
@@ -107,9 +107,11 @@ public:
|
||||
|
||||
verify_universe("Before CDS dynamic dump");
|
||||
DEBUG_ONLY(SystemDictionaryShared::NoClassLoadingMark nclm);
|
||||
|
||||
// Block concurrent class unloading from changing the _dumptime_table
|
||||
MutexLocker ml(DumpTimeTable_lock, Mutex::_no_safepoint_check_flag);
|
||||
SystemDictionaryShared::check_excluded_classes();
|
||||
|
||||
MutexLocker ml(DumpTimeTable_lock, Mutex::_no_safepoint_check_flag);
|
||||
init_header();
|
||||
gather_source_objs();
|
||||
reserve_buffer();
|
||||
|
||||
@@ -484,12 +484,10 @@ void VM_PopulateDumpSharedSpace::doit() {
|
||||
|
||||
NOT_PRODUCT(SystemDictionary::verify();)
|
||||
|
||||
// At this point, many classes have been loaded.
|
||||
// Gather systemDictionary classes in a global array and do everything to
|
||||
// that so we don't have to walk the SystemDictionary again.
|
||||
// Block concurrent class unloading from changing the _dumptime_table
|
||||
MutexLocker ml(DumpTimeTable_lock, Mutex::_no_safepoint_check_flag);
|
||||
SystemDictionaryShared::check_excluded_classes();
|
||||
|
||||
MutexLocker ml(DumpTimeTable_lock, Mutex::_no_safepoint_check_flag);
|
||||
StaticArchiveBuilder builder;
|
||||
builder.gather_source_objs();
|
||||
builder.reserve_buffer();
|
||||
|
||||
@@ -1485,6 +1485,8 @@ public:
|
||||
};
|
||||
|
||||
void SystemDictionaryShared::check_excluded_classes() {
|
||||
assert(no_class_loading_should_happen(), "sanity");
|
||||
assert_lock_strong(DumpTimeTable_lock);
|
||||
ExcludeDumpTimeSharedClasses excl;
|
||||
_dumptime_table->iterate(&excl);
|
||||
_dumptime_table->update_counts();
|
||||
|
||||
Reference in New Issue
Block a user