RFR: 8257232: CompileThresholdScaling fails to work on 32-bit platforms

Jie Fu jiefu at openjdk.java.net
Sat Nov 28 23:39:03 UTC 2020


Hi all,

CompileThresholdScaling is incorrect on 32-bit platforms.

If you run the following command on Linux-32:
java -XX:CompileThresholdScaling=0.75 -version
It gets the following unexpected warnings:
intx Tier0InvokeNotifyFreqLog=32 is outside the allowed range [ 0 ... 30 ]
intx Tier0BackedgeNotifyFreqLog=32 is outside the allowed range [ 0 ... 30 ]
intx Tier2InvokeNotifyFreqLog=32 is outside the allowed range [ 0 ... 30 ]
intx Tier2BackedgeNotifyFreqLog=32 is outside the allowed range [ 0 ... 30 ]
intx Tier3InvokeNotifyFreqLog=32 is outside the allowed range [ 0 ... 30 ]
intx Tier3BackedgeNotifyFreqLog=32 is outside the allowed range [ 0 ... 30 ]
intx Tier23InlineeNotifyFreqLog=32 is outside the allowed range [ 0 ... 30 ]

The failure is that nth_bit(max_freq_bits) [1] = nth_bit(32) [2] = 0 on 32-bit platforms.
So the scaling logic is wrong.
It would be better to fix it.

Thanks.
Best regards,
Jie

[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/compilerDefinitions.cpp#L125
[2] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/utilities/globalDefinitions.hpp#L973

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

Commit messages:
 - 8257232: CompileThresholdScaling fails to work on 32-bit platforms

Changes: https://git.openjdk.java.net/jdk/pull/1499/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1499&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8257232
  Stats: 9 lines in 1 file changed: 6 ins; 2 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1499.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1499/head:pull/1499

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


More information about the hotspot-compiler-dev mailing list