mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8247879: Rework WeakHandle and OopHandle to dynamically support different OopStorages
Reviewed-by: coleenp, eosterlund
This commit is contained in:
parent
b7e944953e
commit
17f2250c5a
17 changed files with 84 additions and 112 deletions
|
@ -55,6 +55,7 @@
|
|||
#include "classfile/packageEntry.hpp"
|
||||
#include "classfile/symbolTable.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "gc/shared/oopStorageSet.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
|
@ -487,7 +488,7 @@ void ClassLoaderData::add_class(Klass* k, bool publicize /* true */) {
|
|||
void ClassLoaderData::initialize_holder(Handle loader_or_mirror) {
|
||||
if (loader_or_mirror() != NULL) {
|
||||
assert(_holder.is_null(), "never replace holders");
|
||||
_holder = WeakHandle<vm_weak_data>::create(loader_or_mirror);
|
||||
_holder = WeakHandle(OopStorageSet::vm_weak(), loader_or_mirror);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -654,7 +655,7 @@ ClassLoaderData::~ClassLoaderData() {
|
|||
ClassLoaderDataGraph::dec_instance_classes(cl.instance_class_released());
|
||||
|
||||
// Release the WeakHandle
|
||||
_holder.release();
|
||||
_holder.release(OopStorageSet::vm_weak());
|
||||
|
||||
// Release C heap allocated hashtable for all the packages.
|
||||
if (_packages != NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue