mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8277216: Examine InstanceKlass::_misc_flags for concurrency issues
Reviewed-by: hseigel, dholmes
This commit is contained in:
parent
abab1738a7
commit
3607a5cdd9
2 changed files with 15 additions and 22 deletions
|
@ -253,8 +253,7 @@ class InstanceKlass: public Klass {
|
|||
_misc_is_shared_boot_class = 1 << 10, // defining class loader is boot class loader
|
||||
_misc_is_shared_platform_class = 1 << 11, // defining class loader is platform class loader
|
||||
_misc_is_shared_app_class = 1 << 12, // defining class loader is app class loader
|
||||
_misc_has_resolved_methods = 1 << 13, // resolved methods table entries added for this class
|
||||
_misc_has_contended_annotations = 1 << 14 // has @Contended annotation
|
||||
_misc_has_contended_annotations = 1 << 13 // has @Contended annotation
|
||||
};
|
||||
u2 shared_loader_type_bits() const {
|
||||
return _misc_is_shared_boot_class|_misc_is_shared_platform_class|_misc_is_shared_app_class;
|
||||
|
@ -366,10 +365,6 @@ class InstanceKlass: public Klass {
|
|||
_misc_flags |= _misc_shared_loading_failed;
|
||||
}
|
||||
|
||||
void clear_shared_loading_failed() {
|
||||
_misc_flags &= ~_misc_shared_loading_failed;
|
||||
}
|
||||
|
||||
void set_shared_class_loader_type(s2 loader_type);
|
||||
|
||||
void assign_class_loader_type();
|
||||
|
@ -378,10 +373,9 @@ class InstanceKlass: public Klass {
|
|||
return (_misc_flags & _misc_has_nonstatic_fields) != 0;
|
||||
}
|
||||
void set_has_nonstatic_fields(bool b) {
|
||||
assert(!has_nonstatic_fields(), "set once");
|
||||
if (b) {
|
||||
_misc_flags |= _misc_has_nonstatic_fields;
|
||||
} else {
|
||||
_misc_flags &= ~_misc_has_nonstatic_fields;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -563,10 +557,9 @@ public:
|
|||
return (_misc_flags & _misc_should_verify_class) != 0;
|
||||
}
|
||||
void set_should_verify_class(bool value) {
|
||||
assert(!should_verify_class(), "set once");
|
||||
if (value) {
|
||||
_misc_flags |= _misc_should_verify_class;
|
||||
} else {
|
||||
_misc_flags &= ~_misc_should_verify_class;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -695,10 +688,9 @@ public:
|
|||
return (_misc_flags & _misc_is_contended) != 0;
|
||||
}
|
||||
void set_is_contended(bool value) {
|
||||
assert(!is_contended(), "set once");
|
||||
if (value) {
|
||||
_misc_flags |= _misc_is_contended;
|
||||
} else {
|
||||
_misc_flags &= ~_misc_is_contended;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -733,10 +725,9 @@ public:
|
|||
return ((_misc_flags & _misc_has_contended_annotations) != 0);
|
||||
}
|
||||
void set_has_contended_annotations(bool value) {
|
||||
assert(!has_contended_annotations(), "set once");
|
||||
if (value) {
|
||||
_misc_flags |= _misc_has_contended_annotations;
|
||||
} else {
|
||||
_misc_flags &= ~_misc_has_contended_annotations;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -789,11 +780,11 @@ public:
|
|||
}
|
||||
|
||||
bool has_resolved_methods() const {
|
||||
return (_misc_flags & _misc_has_resolved_methods) != 0;
|
||||
return _access_flags.has_resolved_methods();
|
||||
}
|
||||
|
||||
void set_has_resolved_methods() {
|
||||
_misc_flags |= _misc_has_resolved_methods;
|
||||
_access_flags.set_has_resolved_methods();
|
||||
}
|
||||
private:
|
||||
|
||||
|
@ -862,10 +853,9 @@ public:
|
|||
return (_misc_flags & _misc_has_nonstatic_concrete_methods) != 0;
|
||||
}
|
||||
void set_has_nonstatic_concrete_methods(bool b) {
|
||||
assert(!has_nonstatic_concrete_methods(), "set once");
|
||||
if (b) {
|
||||
_misc_flags |= _misc_has_nonstatic_concrete_methods;
|
||||
} else {
|
||||
_misc_flags &= ~_misc_has_nonstatic_concrete_methods;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -873,10 +863,9 @@ public:
|
|||
return (_misc_flags & _misc_declares_nonstatic_concrete_methods) != 0;
|
||||
}
|
||||
void set_declares_nonstatic_concrete_methods(bool b) {
|
||||
assert(!declares_nonstatic_concrete_methods(), "set once");
|
||||
if (b) {
|
||||
_misc_flags |= _misc_declares_nonstatic_concrete_methods;
|
||||
} else {
|
||||
_misc_flags &= ~_misc_declares_nonstatic_concrete_methods;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue