# HG changeset patch # User kvn # Date 1309296627 25200 # Node ID 498c6cf70f7e512ca775ba4cebfc4c3a21a225b7 # Parent ddd894528dbcfe571f3cdcd2e3d914a2e900eec4 7058036: FieldsAllocationStyle=2 does not work in 32-bit VM Summary: parseClassFile() incorrectly uses nonstatic_oop_map_size() method instead of nonstatic_oop_map_count(). Reviewed-by: never Contributed-by: Krystal Mok diff -r ddd894528dbc -r 498c6cf70f7e src/share/vm/classfile/classFileParser.cpp --- a/src/share/vm/classfile/classFileParser.cpp Thu Jun 23 17:14:06 2011 -0700 +++ b/src/share/vm/classfile/classFileParser.cpp Tue Jun 28 14:30:27 2011 -0700 @@ -3287,9 +3287,9 @@ // Fields allocation: oops fields in super and sub classes are together. if( nonstatic_field_size > 0 && super_klass() != NULL && super_klass->nonstatic_oop_map_size() > 0 ) { - int map_size = super_klass->nonstatic_oop_map_size(); + int map_count = super_klass->nonstatic_oop_map_count(); OopMapBlock* first_map = super_klass->start_of_nonstatic_oop_maps(); - OopMapBlock* last_map = first_map + map_size - 1; + OopMapBlock* last_map = first_map + map_count - 1; int next_offset = last_map->offset() + (last_map->count() * heapOopSize); if (next_offset == next_nonstatic_field_offset) { allocation_style = 0; // allocate oops first