mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
7177409: Perf regression in JVM_GetClassDeclaredFields after generic signature changes
In fieldDescriptor::generic_signature() returns NULL immediately if the field has no generic signature. Reviewed-by: dholmes, coleenp, jcoomes
This commit is contained in:
parent
8b20e7af53
commit
1a35ed23d9
3 changed files with 6 additions and 1 deletions
|
@ -39,6 +39,10 @@ oop fieldDescriptor::loader() const {
|
|||
}
|
||||
|
||||
Symbol* fieldDescriptor::generic_signature() const {
|
||||
if (!has_generic_signature()) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int idx = 0;
|
||||
instanceKlass* ik = instanceKlass::cast(field_holder());
|
||||
for (AllFieldStream fs(ik); !fs.done(); fs.next()) {
|
||||
|
|
|
@ -100,6 +100,7 @@ class fieldDescriptor VALUE_OBJ_CLASS_SPEC {
|
|||
bool is_field_access_watched() const { return access_flags().is_field_access_watched(); }
|
||||
bool is_field_modification_watched() const
|
||||
{ return access_flags().is_field_modification_watched(); }
|
||||
bool has_generic_signature() const { return access_flags().field_has_generic_signature(); }
|
||||
|
||||
void set_is_field_access_watched(const bool value) {
|
||||
_access_flags.set_is_field_access_watched(value);
|
||||
|
|
|
@ -829,7 +829,7 @@ oop Reflection::new_field(fieldDescriptor* fd, bool intern_name, TRAPS) {
|
|||
java_lang_reflect_Field::set_modifiers(rh(), fd->access_flags().as_int() & JVM_RECOGNIZED_FIELD_MODIFIERS);
|
||||
java_lang_reflect_Field::set_override(rh(), false);
|
||||
if (java_lang_reflect_Field::has_signature_field() &&
|
||||
fd->generic_signature() != NULL) {
|
||||
fd->has_generic_signature()) {
|
||||
Symbol* gs = fd->generic_signature();
|
||||
Handle sig = java_lang_String::create_from_symbol(gs, CHECK_NULL);
|
||||
java_lang_reflect_Field::set_signature(rh(), sig());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue