8198313: Wrap holder object for ClassLoaderData in a WeakHandle

Use WeakHandle for ClassLoaderData::_holder so that is_alive closure is not needed

Reviewed-by: rehn, kbarrett
This commit is contained in:
Coleen Phillimore 2018-04-10 10:06:42 -04:00
parent 21f636f3cf
commit d187884156
13 changed files with 273 additions and 48 deletions

View file

@ -646,10 +646,10 @@ class InstanceKlass: public Klass {
return is_anonymous() ? java_mirror() : class_loader();
}
// Load the klass_holder as a phantom. This is useful when a weak Klass
// Load the klass's holder as a phantom. This is useful when a weak Klass
// pointer has been "peeked" and then must be kept alive before it may
// be used safely.
oop klass_holder_phantom();
oop holder_phantom() const;
bool is_contended() const {
return (_misc_flags & _misc_is_contended) != 0;