*Address.hashCode ignore the upper 32 bits of a long value

Mitsuru Kariya kariyam at oss.nttdata.com
Wed Apr 14 16:59:29 UTC 2021


Thank you for your consideration.
I would like to send a pull request soon.

Thanks

On 2021-04-06 06:17, Chris Plummer wrote:
> [moving to serviceability-dev]
> 
> Hi,
> 
> I'm not sure if Address hashcodes are even used by SA, and if they
> are, I doubt this slightly improved hash would make a noticeable
> difference. However, if you want to pursue this change just to get
> started with making OpenJDK contributions, I'm ok with that. I've
> filed https://bugs.openjdk.java.net/browse/JDK-8264734
> 
> thanks,
> 
> Chris
> 
> On 4/4/21 1:31 AM, kariyam wrote:
>> Hi,
>> 
>> I found that sun.jvm.hotspot.debugger.*.*Address.hashCode ignore the 
>> upper 32 bits of a long value.
>> 
>> e.g. 
>> https://github.com/openjdk/jdk/blob/3789983e89c9de252ef546a1b98a732a7d066650/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxAddress.java#L56
>> 
>> I don't think the upper 32 bits of a long value should be ignored.
>> IMHO, the Long.hashCode static method is suitable for such cases.
>> 
>> If it's worth making this change, could anyone submit this issue to 
>> JBS?
>> 
>> I'm ready to submit a pull request, but I don't have an Author role.
>> 
>> Please let me know if there is a better place to do so.
>> 
>> Thanks


More information about the serviceability-dev mailing list