RFR: 8261731: shallow copy the internal buffer of a scalar-replaced java.lang.String object

Vladimir Kozlov kvn at openjdk.java.net
Wed Mar 24 00:48:39 UTC 2021


On Wed, 24 Mar 2021 00:39:51 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>> Hmm, actually it was easy solved with `-XX:DisableIntrinsic=_min` :(
>> 
>> This intrinsic was implemented long ago. the code is used for `arraycopy` optimization. But for some reason it does not work here.
>> 
>> I think this should be investigated first-first.  It would be interesting to see performance effects if we disable this intrinsic at all.
>
> You seem to have had a run-in with these intrinsics causing issues before: https://bugs.openjdk.java.net/browse/JDK-8039104 - is this a similar issue?
> 
> On a trivial micro adding together a few Math.min values the intrinsic seem to have no effect on my x64 system, down to generating the exact same assembly.

Yes, my test5() have `cmove`:
021     cmovlge RBP, RDX        # signed, int

-------------

PR: https://git.openjdk.java.net/jdk/pull/2570


More information about the hotspot-compiler-dev mailing list