提交 251dc669 编写于 作者: J jiangli

7177409: Perf regression in JVM_GetClassDeclaredFields after generic signature changes.

Summary: In fieldDescriptor::generic_signature() returns NULL immediately if the field has no generic signature.
Reviewed-by: dholmes, coleenp, jcoomes
上级 59a9adbd
......@@ -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());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册