8003985: Support @Contended Annotation - JEP 142

HotSpot changes to support @Contended annotation.

Reviewed-by: coleenp, kvn, jrose
This commit is contained in:
Aleksey Shipilev 2013-01-14 15:17:47 +01:00 committed by Jesper Wilhelmsson
parent ae35dfeeec
commit 0614ed6542
11 changed files with 617 additions and 92 deletions

View file

@ -230,7 +230,8 @@ class InstanceKlass: public Klass {
_misc_rewritten = 1 << 0, // methods rewritten.
_misc_has_nonstatic_fields = 1 << 1, // for sizing with UseCompressedOops
_misc_should_verify_class = 1 << 2, // allow caching of preverification
_misc_is_anonymous = 1 << 3 // has embedded _inner_classes field
_misc_is_anonymous = 1 << 3, // has embedded _inner_classes field
_misc_is_contended = 1 << 4 // marked with contended annotation
};
u2 _misc_flags;
u2 _minor_version; // minor version number of class file
@ -550,6 +551,17 @@ class InstanceKlass: public Klass {
return is_anonymous() ? java_mirror() : class_loader();
}
bool is_contended() const {
return (_misc_flags & _misc_is_contended) != 0;
}
void set_is_contended(bool value) {
if (value) {
_misc_flags |= _misc_is_contended;
} else {
_misc_flags &= ~_misc_is_contended;
}
}
// signers
objArrayOop signers() const { return _signers; }
void set_signers(objArrayOop s) { klass_oop_store((oop*)&_signers, s); }