RFR: 8221732: Introduce CollectedHeap::hash_oop()

Per Liden per.liden at oracle.com
Mon Apr 1 11:33:52 UTC 2019


Thanks Thomas!

/Per

On 4/1/19 12:36 PM, Thomas Schatzl wrote:
> Hi,
> 
> On Mon, 2019-04-01 at 09:39 +0200, Per Liden wrote:
>> The JVMTITagMap hashes oops by casts them to 32-bit unsigned
>> integers.
>> For ZGC, which has colored oop, this happens to work because all
>> metadata bits are above 32-bit. In theory, ZGC could store its
>> metadata bits in the lower 32-bit part of the address, in which case
>> this hash scheme would break. Today we have an ugly assert in
>> JvmtiTagHashmap::hash() to make sure this doesn't happen. However,
>> the JVMITagMap should not make assumptions on what an oop looks like,
>> and should instead delegate this hashing to CollectedHeap.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8221732
>> Webrev: http://cr.openjdk.java.net/~pliden/8221732/webrev.0
> 
>    looks good.
> 
> Thomas
> 
> 



More information about the hotspot-gc-dev mailing list