RFR[10]: 8180614: Skip range and constraint checks on non-existent flags

Claes Redestad claes.redestad at oracle.com
Thu May 18 16:35:38 UTC 2017


Hi,

analyzing the remaining overhead in command line flag
checking after JDK-8178991, I found that we're taking a
runtime cost scanning for flags that doesn't exist in the
build, e.g., develop flags in a product build.

Since such flags are simply emitted as constants, they
can't[1] be in violation of the constraints, thus I think
we can safely skip such checks altogether.

This removes ~500k instructions from being executed for
no reason during VM startup on a 64-bit JVM.

Bug: https://bugs.openjdk.java.net/browse/JDK-8180614
Webrev: http://cr.openjdk.java.net/~redestad/8180614/hotspot.00/

Thanks!

/Claes

[1] Unless the default value is invalid, which is a potential
programmer error that would be caught in debug builds
anyhow.


More information about the hotspot-runtime-dev mailing list