mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8246340: Move SystemDictionary GC roots into OopStorage
Use vm_global() OopStorage for system dictionary roots Reviewed-by: eosterlund, lfoltan
This commit is contained in:
parent
06e47d05b6
commit
498b0e61ed
31 changed files with 149 additions and 167 deletions
|
@ -33,6 +33,7 @@
|
|||
#include "memory/metaspaceClosure.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "oops/oopHandle.inline.hpp"
|
||||
#include "runtime/mutexLocker.hpp"
|
||||
#include "runtime/safepointVerifiers.hpp"
|
||||
#include "utilities/hashtable.inline.hpp"
|
||||
|
@ -400,6 +401,20 @@ void Dictionary::clean_cached_protection_domains() {
|
|||
}
|
||||
}
|
||||
|
||||
oop SymbolPropertyEntry::method_type() const {
|
||||
return _method_type.resolve();
|
||||
}
|
||||
|
||||
void SymbolPropertyEntry::set_method_type(oop p) {
|
||||
_method_type = OopHandle::create(p);
|
||||
}
|
||||
|
||||
void SymbolPropertyEntry::free_entry() {
|
||||
// decrement Symbol refcount here because hashtable doesn't.
|
||||
literal()->decrement_refcount();
|
||||
// Free OopHandle
|
||||
_method_type.release();
|
||||
}
|
||||
|
||||
SymbolPropertyTable::SymbolPropertyTable(int table_size)
|
||||
: Hashtable<Symbol*, mtSymbol>(table_size, sizeof(SymbolPropertyEntry))
|
||||
|
@ -436,16 +451,6 @@ SymbolPropertyEntry* SymbolPropertyTable::add_entry(int index, unsigned int hash
|
|||
return p;
|
||||
}
|
||||
|
||||
void SymbolPropertyTable::oops_do(OopClosure* f) {
|
||||
for (int index = 0; index < table_size(); index++) {
|
||||
for (SymbolPropertyEntry* p = bucket(index); p != NULL; p = p->next()) {
|
||||
if (p->method_type() != NULL) {
|
||||
f->do_oop(p->method_type_addr());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SymbolPropertyTable::methods_do(void f(Method*)) {
|
||||
for (int index = 0; index < table_size(); index++) {
|
||||
for (SymbolPropertyEntry* p = bucket(index); p != NULL; p = p->next()) {
|
||||
|
@ -457,6 +462,11 @@ void SymbolPropertyTable::methods_do(void f(Method*)) {
|
|||
}
|
||||
}
|
||||
|
||||
void SymbolPropertyTable::free_entry(SymbolPropertyEntry* entry) {
|
||||
entry->free_entry();
|
||||
Hashtable<Symbol*, mtSymbol>::free_entry(entry);
|
||||
}
|
||||
|
||||
void DictionaryEntry::verify_protection_domain_set() {
|
||||
MutexLocker ml(ProtectionDomainSet_lock, Mutex::_no_safepoint_check_flag);
|
||||
for (ProtectionDomainEntry* current = pd_set(); // accessed at a safepoint
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue