RFR(S): 6378256: Performance problem with System.identityHashCode in client compiler

Rahul Raghavan rahul.v.raghavan at oracle.com
Thu Feb 11 07:49:05 UTC 2016


Hi,

Thank you Roland for the comments and yes agree with your points.

Please review revised webrev for JDK-6378256.
webrev: http://cr.openjdk.java.net/~thartmann/6378256/webrev.04/

New changes done here are -
  i. added new inline_check_hashcode_from_object_header() in SharedRuntime class [sharedRuntime.hpp] guarded with 'X86 && COMPILER1'
  ii. required comment text justification done.

Confirmed no issues with jprt testing (-testset hotspot) and unit tests.

Thank you,
Rahul

> -----Original Message-----
> From: Roland Westrelin > Sent: Monday, February 08, 2016 11:00 PM > To: Rahul Raghavan > Cc: hotspot-compiler-dev at openjdk.java.net
> 
> Hi Rahul,
> 
> > Please review revised patch, notes for JDK-6378256.
> > https://bugs.openjdk.java.net/browse/JDK-6378256
> >
> >
> > Latest webrev-03: http://cr.openjdk.java.net/~thartmann/6378256/webrev.03/
> 
> Thanks for making the change. I would say it’s better to add inline_check_hashcode_from_object_header() to sharedRuntime.hpp
> with #ifdef X86 rather than have the inline declaration. Not sure what others think.
> 
> >>> Can you justify the comments again?
> 
> I meant justify as text justification that is right align that comment:
> 
>   36 // ---------------------------------------------------------------------------
>   37 // Object.hashCode, System.identityHashCode can pull the hashCode from the header word
>   38 // instead of doing a full VM transition once it's been computed.
>   39 // Since hashCode is usually polymorphic at call sites we can't do
>   40 // this optimization at the call site without a lot of work.
> 
> and that comment
> 
> 2019     // Object.hashCode, System.identityHashCode can pull the hashCode from the header word
> 2020     // instead of doing a full VM transition once it's been computed.
> 2021     // Since hashCode is usually polymorphic at call sites we can't do
> 2022     // this optimization at the call site without a lot of work.
> 
> Sorry for the confusion. The code looks good to me/
> 
> Roland.
> 
> 


More information about the hotspot-compiler-dev mailing list