8186088: ConstantPoolCache::_resolved_references is not a JNIHandle

Make an OopHandle type to replace jobject to encapsulate these oop pointers in metadata and module entry.

Reviewed-by: sspitsyn, dholmes, jiangli, twisti
This commit is contained in:
Coleen Phillimore 2017-08-23 12:00:39 -04:00
parent c1f2527986
commit 111116dd5b
31 changed files with 142 additions and 48 deletions

View file

@ -29,6 +29,7 @@
#include "memory/memRegion.hpp"
#include "memory/metaspace.hpp"
#include "memory/metaspaceCounters.hpp"
#include "oops/oopHandle.hpp"
#include "runtime/mutex.hpp"
#include "trace/traceMacros.hpp"
#include "utilities/growableArray.hpp"
@ -362,8 +363,8 @@ class ClassLoaderData : public CHeapObj<mtClass> {
void verify();
const char* loader_name();
jobject add_handle(Handle h);
void remove_handle_unsafe(jobject h);
OopHandle add_handle(Handle h);
void init_handle_locked(OopHandle& pd, Handle h); // used for concurrent access to ModuleEntry::_pd field
void add_class(Klass* k, bool publicize = true);
void remove_class(Klass* k);
bool contains_klass(Klass* k);