8221872: Remove uses of ClassLoaderWeakHandle typedef in protection domain table
Make consistent with StringTable and ResolvedMethodTable Reviewed-by: dholmes
This commit is contained in:
parent
8c67e267a0
commit
8e5a71de44
src/hotspot/share
@ -45,7 +45,7 @@ int ProtectionDomainCacheTable::index_for(Handle protection_domain) {
|
||||
}
|
||||
|
||||
ProtectionDomainCacheTable::ProtectionDomainCacheTable(int table_size)
|
||||
: Hashtable<ClassLoaderWeakHandle, mtClass>(table_size, sizeof(ProtectionDomainCacheEntry))
|
||||
: Hashtable<WeakHandle<vm_class_loader_data>, mtClass>(table_size, sizeof(ProtectionDomainCacheEntry))
|
||||
{ _dead_entries = false;
|
||||
_total_oops_removed = 0;
|
||||
}
|
||||
@ -180,8 +180,8 @@ ProtectionDomainCacheEntry* ProtectionDomainCacheTable::add_entry(int index, uns
|
||||
protection_domain->print_value_on(&ls);
|
||||
ls.cr();
|
||||
}
|
||||
ClassLoaderWeakHandle w = ClassLoaderWeakHandle::create(protection_domain);
|
||||
WeakHandle<vm_class_loader_data> w = WeakHandle<vm_class_loader_data>::create(protection_domain);
|
||||
ProtectionDomainCacheEntry* p = new_entry(hash, w);
|
||||
Hashtable<ClassLoaderWeakHandle, mtClass>::add_entry(index, p);
|
||||
Hashtable<WeakHandle<vm_class_loader_data>, mtClass>::add_entry(index, p);
|
||||
return p;
|
||||
}
|
||||
|
@ -35,18 +35,18 @@
|
||||
// to dictionary.hpp pd_set for more information about how protection domain entries
|
||||
// are used.
|
||||
// This table is walked during GC, rather than the class loader data graph dictionaries.
|
||||
class ProtectionDomainCacheEntry : public HashtableEntry<ClassLoaderWeakHandle, mtClass> {
|
||||
class ProtectionDomainCacheEntry : public HashtableEntry<WeakHandle<vm_class_loader_data>, mtClass> {
|
||||
friend class VMStructs;
|
||||
public:
|
||||
oop object();
|
||||
oop object_no_keepalive();
|
||||
|
||||
ProtectionDomainCacheEntry* next() {
|
||||
return (ProtectionDomainCacheEntry*)HashtableEntry<ClassLoaderWeakHandle, mtClass>::next();
|
||||
return (ProtectionDomainCacheEntry*)HashtableEntry<WeakHandle<vm_class_loader_data>, mtClass>::next();
|
||||
}
|
||||
|
||||
ProtectionDomainCacheEntry** next_addr() {
|
||||
return (ProtectionDomainCacheEntry**)HashtableEntry<ClassLoaderWeakHandle, mtClass>::next_addr();
|
||||
return (ProtectionDomainCacheEntry**)HashtableEntry<WeakHandle<vm_class_loader_data>, mtClass>::next_addr();
|
||||
}
|
||||
|
||||
void verify();
|
||||
@ -61,21 +61,21 @@ class ProtectionDomainCacheEntry : public HashtableEntry<ClassLoaderWeakHandle,
|
||||
// we only need to iterate over this set.
|
||||
// The amount of different protection domains used is typically magnitudes smaller
|
||||
// than the number of system dictionary entries (loaded classes).
|
||||
class ProtectionDomainCacheTable : public Hashtable<ClassLoaderWeakHandle, mtClass> {
|
||||
class ProtectionDomainCacheTable : public Hashtable<WeakHandle<vm_class_loader_data>, mtClass> {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
ProtectionDomainCacheEntry* bucket(int i) const {
|
||||
return (ProtectionDomainCacheEntry*) Hashtable<ClassLoaderWeakHandle, mtClass>::bucket(i);
|
||||
return (ProtectionDomainCacheEntry*) Hashtable<WeakHandle<vm_class_loader_data>, mtClass>::bucket(i);
|
||||
}
|
||||
|
||||
// The following method is not MT-safe and must be done under lock.
|
||||
ProtectionDomainCacheEntry** bucket_addr(int i) {
|
||||
return (ProtectionDomainCacheEntry**) Hashtable<ClassLoaderWeakHandle, mtClass>::bucket_addr(i);
|
||||
return (ProtectionDomainCacheEntry**) Hashtable<WeakHandle<vm_class_loader_data>, mtClass>::bucket_addr(i);
|
||||
}
|
||||
|
||||
ProtectionDomainCacheEntry* new_entry(unsigned int hash, ClassLoaderWeakHandle protection_domain) {
|
||||
ProtectionDomainCacheEntry* new_entry(unsigned int hash, WeakHandle<vm_class_loader_data> protection_domain) {
|
||||
ProtectionDomainCacheEntry* entry = (ProtectionDomainCacheEntry*)
|
||||
Hashtable<ClassLoaderWeakHandle, mtClass>::new_entry(hash, protection_domain);
|
||||
Hashtable<WeakHandle<vm_class_loader_data>, mtClass>::new_entry(hash, protection_domain);
|
||||
return entry;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -129,7 +129,7 @@ static int literal_size(oop obj) {
|
||||
}
|
||||
}
|
||||
|
||||
static int literal_size(ClassLoaderWeakHandle v) {
|
||||
static int literal_size(WeakHandle<vm_class_loader_data> v) {
|
||||
return literal_size(v.peek());
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ template <class T> void print_literal(T l) {
|
||||
l->print();
|
||||
}
|
||||
|
||||
static void print_literal(ClassLoaderWeakHandle l) {
|
||||
static void print_literal(WeakHandle<vm_class_loader_data> l) {
|
||||
l.print();
|
||||
}
|
||||
|
||||
@ -308,15 +308,14 @@ template class Hashtable<ConstantPool*, mtClass>;
|
||||
template class Hashtable<Symbol*, mtSymbol>;
|
||||
template class Hashtable<Klass*, mtClass>;
|
||||
template class Hashtable<InstanceKlass*, mtClass>;
|
||||
template class Hashtable<ClassLoaderWeakHandle, mtClass>;
|
||||
template class Hashtable<WeakHandle<vm_class_loader_data>, mtClass>;
|
||||
template class Hashtable<Symbol*, mtModule>;
|
||||
template class Hashtable<oop, mtSymbol>;
|
||||
template class Hashtable<ClassLoaderWeakHandle, mtSymbol>;
|
||||
template class Hashtable<Symbol*, mtClass>;
|
||||
template class HashtableEntry<Symbol*, mtSymbol>;
|
||||
template class HashtableEntry<Symbol*, mtClass>;
|
||||
template class HashtableEntry<oop, mtSymbol>;
|
||||
template class HashtableEntry<ClassLoaderWeakHandle, mtSymbol>;
|
||||
template class HashtableEntry<WeakHandle<vm_class_loader_data>, mtClass>;
|
||||
template class HashtableBucket<mtClass>;
|
||||
template class BasicHashtableEntry<mtSymbol>;
|
||||
template class BasicHashtableEntry<mtCode>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user