Mercurial > hg > truffle
comparison src/share/vm/runtime/fieldDescriptor.cpp @ 6176:634b8615a6ba
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
author | jiangli |
---|---|
date | Fri, 22 Jun 2012 14:00:39 -0400 |
parents | 71afdabfd05b |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
6175:f7baf26515fc | 6176:634b8615a6ba |
---|---|
37 oop fieldDescriptor::loader() const { | 37 oop fieldDescriptor::loader() const { |
38 return instanceKlass::cast(_cp->pool_holder())->class_loader(); | 38 return instanceKlass::cast(_cp->pool_holder())->class_loader(); |
39 } | 39 } |
40 | 40 |
41 Symbol* fieldDescriptor::generic_signature() const { | 41 Symbol* fieldDescriptor::generic_signature() const { |
42 if (!has_generic_signature()) { | |
43 return NULL; | |
44 } | |
45 | |
42 int idx = 0; | 46 int idx = 0; |
43 instanceKlass* ik = instanceKlass::cast(field_holder()); | 47 instanceKlass* ik = instanceKlass::cast(field_holder()); |
44 for (AllFieldStream fs(ik); !fs.done(); fs.next()) { | 48 for (AllFieldStream fs(ik); !fs.done(); fs.next()) { |
45 if (idx == _index) { | 49 if (idx == _index) { |
46 return fs.generic_signature(); | 50 return fs.generic_signature(); |