The following function is supposed to return size in words:
```
static int size(int vtable_length, int itable_length,
int nonstatic_oop_map_size,
bool is_interface,
bool is_inline_type) {
return align_metadata_size(header_size() +
vtable_length +
itable_length +
nonstatic_oop_map_size +
(is_interface ? (int)sizeof(Klass*)/wordSize : 0) +
(is_inline_type ? (int)sizeof(InlineKlassFixedBlock) : 0));
}
```
but `sizeof(InlineKlassFixedBlock)` returns a size in bytes. This adds 640 bytes instead of 80 bytes to all InlineKlasses.
```
static int size(int vtable_length, int itable_length,
int nonstatic_oop_map_size,
bool is_interface,
bool is_inline_type) {
return align_metadata_size(header_size() +
vtable_length +
itable_length +
nonstatic_oop_map_size +
(is_interface ? (int)sizeof(Klass*)/wordSize : 0) +
(is_inline_type ? (int)sizeof(InlineKlassFixedBlock) : 0));
}
```
but `sizeof(InlineKlassFixedBlock)` returns a size in bytes. This adds 640 bytes instead of 80 bytes to all InlineKlasses.
- links to
-
Commit(lworld)
openjdk/valhalla/e82573ea
-
Review(lworld)
openjdk/valhalla/1804