comparison src/share/vm/oops/cpCache.hpp @ 13395:f19b6d14a035

8170812: Metaspace corruption caused by incorrect memory size for MethodCounters Reviewed-by: kbarrett, coleenp
author aph
date Fri, 07 Apr 2017 13:42:00 +0100
parents 65b3642849e7
children 0cdc61e61d57
comparison
equal deleted inserted replaced
18:c6601b9b6a4a 19:06d372730998
357 bool is_double() const { return flag_state() == dtos; } 357 bool is_double() const { return flag_state() == dtos; }
358 TosState flag_state() const { assert((uint)number_of_states <= (uint)tos_state_mask+1, ""); 358 TosState flag_state() const { assert((uint)number_of_states <= (uint)tos_state_mask+1, "");
359 return (TosState)((_flags >> tos_state_shift) & tos_state_mask); } 359 return (TosState)((_flags >> tos_state_shift) & tos_state_mask); }
360 360
361 // Code generation support 361 // Code generation support
362 static WordSize size() { return in_WordSize(sizeof(ConstantPoolCacheEntry) / wordSize); } 362 static WordSize size() {
363 return in_WordSize(align_size_up(sizeof(ConstantPoolCacheEntry), wordSize) / wordSize);
364 }
363 static ByteSize size_in_bytes() { return in_ByteSize(sizeof(ConstantPoolCacheEntry)); } 365 static ByteSize size_in_bytes() { return in_ByteSize(sizeof(ConstantPoolCacheEntry)); }
364 static ByteSize indices_offset() { return byte_offset_of(ConstantPoolCacheEntry, _indices); } 366 static ByteSize indices_offset() { return byte_offset_of(ConstantPoolCacheEntry, _indices); }
365 static ByteSize f1_offset() { return byte_offset_of(ConstantPoolCacheEntry, _f1); } 367 static ByteSize f1_offset() { return byte_offset_of(ConstantPoolCacheEntry, _f1); }
366 static ByteSize f2_offset() { return byte_offset_of(ConstantPoolCacheEntry, _f2); } 368 static ByteSize f2_offset() { return byte_offset_of(ConstantPoolCacheEntry, _f2); }
367 static ByteSize flags_offset() { return byte_offset_of(ConstantPoolCacheEntry, _flags); } 369 static ByteSize flags_offset() { return byte_offset_of(ConstantPoolCacheEntry, _flags); }