8191567: Refactor ciInstanceKlass G1 keep alive barrier to use Access API

Reviewed-by: dholmes, rkennke, tschatzl
This commit is contained in:
Erik Österlund 2018-01-08 13:22:05 +01:00
parent 01ab4faae4
commit 8f739404a7
4 changed files with 21 additions and 25 deletions

View file

@ -640,6 +640,11 @@ 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
// pointer has been "peeked" and then must be kept alive before it may
// be used safely.
oop klass_holder_phantom();
bool is_contended() const {
return (_misc_flags & _misc_is_contended) != 0;
}