changeset 3709:c7ed11779ce8

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>
author jiangli
date Tue, 10 Apr 2012 09:31:04 -0700
parents 4a32c51458b9
children 3576af4cb939
files src/share/vm/oops/instanceKlass.hpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.hpp	Sat Apr 07 09:06:55 2012 -0700
+++ b/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; }