mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8207778: Add locking to ModuleEntry and PackageEntry tables
Restructure ClassLoaderDataGraph code to simplify using locks in SystemDictionary::do_unloading() Reviewed-by: lfoltan, coleenp
This commit is contained in:
parent
092e9e4f81
commit
83b2fb5b0d
7 changed files with 37 additions and 28 deletions
|
@ -65,7 +65,7 @@ void LoaderConstraintTable::free_entry(LoaderConstraintEntry *entry) {
|
|||
|
||||
LoaderConstraintEntry** LoaderConstraintTable::find_loader_constraint(
|
||||
Symbol* name, Handle loader) {
|
||||
|
||||
assert_lock_strong(SystemDictionary_lock);
|
||||
unsigned int hash = compute_hash(name);
|
||||
int index = hash_to_index(hash);
|
||||
LoaderConstraintEntry** pp = bucket_addr(index);
|
||||
|
@ -89,7 +89,7 @@ LoaderConstraintEntry** LoaderConstraintTable::find_loader_constraint(
|
|||
|
||||
|
||||
void LoaderConstraintTable::purge_loader_constraints() {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
|
||||
assert_locked_or_safepoint(SystemDictionary_lock);
|
||||
LogTarget(Info, class, loader, constraints) lt;
|
||||
// Remove unloaded entries from constraint table
|
||||
for (int index = 0; index < table_size(); index++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue