7159772: instanceKlass::all_fields_count() returns incorrect total field count
Summary: Fix instanceKlass::all_fields_count() bug.
Reviewed-by: kvn, never
Contributed-by: Jiangli Zhou <jiangli.zhou@oracle.com>
--- a/hotspot/src/share/vm/oops/instanceKlass.hpp Sat Apr 07 09:06:55 2012 -0700
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp Tue Apr 10 09:31:04 2012 -0700
@@ -337,7 +337,7 @@
int java_fields_count() const { return (int)_java_fields_count; }
// Number of fields including any injected fields
- int all_fields_count() const { return _fields->length() / sizeof(FieldInfo::field_slots); }
+ int all_fields_count() const { return _fields->length() / FieldInfo::field_slots; }
typeArrayOop fields() const { return _fields; }