7058036: FieldsAllocationStyle=2 does not work in 32-bit VM

Tue, 28 Jun 2011 14:30:27 -0700

author
kvn
date
Tue, 28 Jun 2011 14:30:27 -0700
changeset 2983
498c6cf70f7e
parent 2982
ddd894528dbc
child 2984
6ae7a1561b53

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 <rednaxelafx@gmail.com>

src/share/vm/classfile/classFileParser.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/classfile/classFileParser.cpp	Thu Jun 23 17:14:06 2011 -0700
     1.2 +++ b/src/share/vm/classfile/classFileParser.cpp	Tue Jun 28 14:30:27 2011 -0700
     1.3 @@ -3287,9 +3287,9 @@
     1.4        // Fields allocation: oops fields in super and sub classes are together.
     1.5        if( nonstatic_field_size > 0 && super_klass() != NULL &&
     1.6            super_klass->nonstatic_oop_map_size() > 0 ) {
     1.7 -        int map_size = super_klass->nonstatic_oop_map_size();
     1.8 +        int map_count = super_klass->nonstatic_oop_map_count();
     1.9          OopMapBlock* first_map = super_klass->start_of_nonstatic_oop_maps();
    1.10 -        OopMapBlock* last_map = first_map + map_size - 1;
    1.11 +        OopMapBlock* last_map = first_map + map_count - 1;
    1.12          int next_offset = last_map->offset() + (last_map->count() * heapOopSize);
    1.13          if (next_offset == next_nonstatic_field_offset) {
    1.14            allocation_style = 0;   // allocate oops first

mercurial