mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8003985: Support @Contended Annotation - JEP 142
HotSpot changes to support @Contended annotation. Reviewed-by: coleenp, kvn, jrose
This commit is contained in:
parent
ae35dfeeec
commit
0614ed6542
11 changed files with 617 additions and 92 deletions
|
@ -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); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue