RFR: 8267303: Replace MinObjectAlignmentSize usages for non-Java heap objects
Coleen Phillimore
coleenp at openjdk.java.net
Tue Jul 6 15:56:50 UTC 2021
On Sun, 4 Jul 2021 22:37:45 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Replace '3' and LogMinObjAlignmentInBytes with LogBytesPerWord (3 for LP64 and 2 for 32 bits).
>> Hoping git actions will test 32 bits.
>> Tested with tier1 on all Oracle platforms, but since I didn't change the values for our platforms, no failures expected.
>
> src/hotspot/share/oops/symbol.hpp line 158:
>
>> 156: static int max_length() { return max_symbol_length; }
>> 157: unsigned identity_hash() const {
>> 158: unsigned addr_bits = (unsigned)((uintptr_t)this >> (LogBytesPerWord + 3));
>
> [pre-existing] I'm puzzled by the `+3` in this line. I'm guessing this is `log2(sizeof(Symbol))`?
Oh that might be a good guess. I thought it was just some way to randomize the address some more. @yminqi or @iklam would know since it was added with JDK-8130115.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4675
More information about the hotspot-dev
mailing list