[15] RFR(M): 8242108: Performance regression after fix for JDK-8229496

Tobias Hartmann tobias.hartmann at oracle.com
Mon Apr 20 15:52:27 UTC 2020


Hi,

please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8242108
http://cr.openjdk.java.net/~thartmann/8242108/webrev.00/

The fix for 8229496 [1] triggers a performance regression with NumberFormat.format(). The problem is
the additional control dependency on a CastII/LL which restricts optimizations due to
_carry_dependency being set (which was necessary because we can not represent non-null integers/long
values in C2's type system).

While investigating, I've noticed that Roland's fix for 8241900 [2] fixes the exact same problem but
in a more elegant way, avoiding an impact on performance.

I'm therefore proposing to back out the original fix for 8229496, leaving the regression test in and
also adding a microbenchmark. I've verified that this solves the performance regression (4547 ops/ms
vs. 5048 ops/ms on my machine).

Thanks,
Tobias

[1] https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2019-August/034865.html
[2] https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2020-April/037778.html


More information about the hotspot-compiler-dev mailing list