RFR (S): 8209972: [GRAAL] Don't run RTM tests with Graal

Vladimir Kozlov vladimir.kozlov at oracle.com
Fri Aug 31 18:12:36 UTC 2018


Hi Gustavo,

I think you should replace !Compiler.isGraalEnabled() with 
Compiler.isC2Enabled() because C2 may be switched off with 
TieredStopAtLevel < 4 flag.

Also can platforms check be replaced with one vmRTMCPU()? Is ppc64 
return true from vmRTMCPU()?

And since you check cpu in here why not to replace all vm.rtm.* with one 
vm.rtm.supported? In such case you would need only one @requires checks 
in tests instead of:

vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os & 
vm.rtm.compiler

Thanks,
Vladimir

On 8/31/18 8:38 AM, Gustavo Romero wrote:
> Hi,
> 
> Could the following small change be reviewed please?
> 
> Bug   : https://bugs.openjdk.java.net/browse/JDK-8209972
> Webrev: http://cr.openjdk.java.net/~gromero/8209972/v1/
> 
> It disables all RTM tests when a compiler not supporting RTM (e.g. Graal)
> is selected on platforms that can have CPU/OS with RTM support.
> 
> It also disables all RTM tests for any other platform that has not a single
> compiler supporting RTM.
> 
> The RTM support was first added to C2 compiler and once checkers for RTM
> (notably vm.rtm.cpu) find the feature "rtm" advertised by the JVM they
> assume that a compiler supporting RTM is available for sure ("rtm" is
> advertised only if RTM is supported by both CPU and OS). Later the JVM
> began to allow the selection of a compiler different from C2, like Graal,
> and it became possible to select a compiler without RTM support despite the
> fact that both the CPU and the OS support RTM. Thus for platforms
> supporting Graal or any other specific compiler the compiler 
> availability for
> the RTM tests must be adjusted and if the selected compiler does not
> support RTM then all RTM tests must be skipped, including the ones meant
> for platforms without CPU or OS RTM support (e.g. *Unsupported*.java)
> because in some cases, like in 
> TestUseRTMLockingOptionOnUnsupportedCPU.java,
> the test expects JVM initialization errors that will never occur because 
> the
> problem is not that the RTM support for CPU or OS is missing, but rather
> because the selected compiler does not support RTM.
> 
> That change adds a new VM property 'vm.rtm.compiler' which can be used to
> filter out compilers without RTM support for specific platforms and adapts
> the current RTM tests to use that new property.
> 
> Nothing changes regarding the number of passing/selected tests for the
> various cpu/os/compiler combinations on platforms that currently might
> support RTM [1], except when Graal is in use.
> 
> Thank you.
> 
> Best regards,
> Gustavo
> 
> 
> [1]
> 
> ** X64 w/ CPU and OS supporting RTM **
> Passed: compiler/rtm/cli/TestRTMAbortThresholdOption.java
> Passed: 
> compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig.java 
> 
> Passed: compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java
> Passed: compiler/rtm/cli/TestRTMLockingThresholdOption.java
> Passed: compiler/rtm/cli/TestRTMRetryCountOption.java
> Passed: compiler/rtm/cli/TestRTMSpinLoopCountOption.java
> Passed: compiler/rtm/cli/TestUseRTMDeoptOptionOnSupportedConfig.java
> Passed: 
> compiler/rtm/cli/TestUseRTMForStackLocksOptionOnSupportedConfig.java
> Passed: compiler/rtm/cli/TestUseRTMLockingOptionOnSupportedConfig.java
> Passed: 
> compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnSupportedConfig.java
> Passed: compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java
> Passed: compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java
> Passed: compiler/rtm/locking/TestRTMAbortThreshold.java
> Passed: compiler/rtm/locking/TestRTMAbortRatio.java
> Passed: compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java
> Passed: compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java
> Passed: compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java
> Passed: compiler/rtm/locking/TestRTMLockingCalculationDelay.java
> Passed: compiler/rtm/locking/TestRTMLockingThreshold.java
> Passed: compiler/rtm/locking/TestRTMRetryCount.java
> Passed: compiler/rtm/locking/TestRTMSpinLoopCount.java
> Passed: compiler/rtm/locking/TestRTMTotalCountIncrRate.java
> Passed: compiler/rtm/locking/TestUseRTMAfterLockInflation.java
> Passed: compiler/rtm/locking/TestUseRTMForInflatedLocks.java
> Passed: compiler/rtm/locking/TestUseRTMDeopt.java
> Passed: compiler/rtm/locking/TestUseRTMForStackLocks.java
> Passed: compiler/rtm/method_options/TestNoRTMLockElidingOption.java
> Passed: compiler/rtm/method_options/TestUseRTMLockElidingOption.java
> Passed: compiler/rtm/locking/TestUseRTMXendForLockBusy.java
> Passed: compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java
> Test results: passed: 30
> 
> ** X64 w/ CPU and OS supporting RTM + Graal compiler wo/ RTM support **
> Test results: no tests selected (all RTM tests skipped)
> 
> ** POWER8 w/ CPU and OS supporting RTM **
> Passed: 
> compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig.java 
> 
> Passed: compiler/rtm/cli/TestRTMAbortThresholdOption.java
> Passed: compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java
> Passed: compiler/rtm/cli/TestRTMLockingThresholdOption.java
> Passed: compiler/rtm/cli/TestRTMRetryCountOption.java
> Passed: compiler/rtm/cli/TestRTMSpinLoopCountOption.java
> Passed: 
> compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnSupportedConfig.java
> Passed: compiler/rtm/cli/TestUseRTMDeoptOptionOnSupportedConfig.java
> Passed: 
> compiler/rtm/cli/TestUseRTMForStackLocksOptionOnSupportedConfig.java
> Passed: compiler/rtm/cli/TestUseRTMLockingOptionOnSupportedConfig.java
> Passed: compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java
> Passed: compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java
> Passed: compiler/rtm/locking/TestRTMAbortRatio.java
> Passed: compiler/rtm/locking/TestRTMAbortThreshold.java
> Passed: compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java
> Passed: compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java
> Passed: compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java
> Passed: compiler/rtm/locking/TestRTMLockingCalculationDelay.java
> Passed: compiler/rtm/locking/TestRTMLockingThreshold.java
> Passed: compiler/rtm/locking/TestRTMRetryCount.java
> Passed: compiler/rtm/locking/TestRTMSpinLoopCount.java
> Passed: compiler/rtm/locking/TestRTMTotalCountIncrRate.java
> Passed: compiler/rtm/locking/TestUseRTMAfterLockInflation.java
> Passed: compiler/rtm/locking/TestUseRTMDeopt.java
> Passed: compiler/rtm/locking/TestUseRTMForInflatedLocks.java
> Passed: compiler/rtm/locking/TestUseRTMForStackLocks.java
> Passed: compiler/rtm/locking/TestUseRTMXendForLockBusy.java
> Passed: compiler/rtm/method_options/TestNoRTMLockElidingOption.java
> Passed: compiler/rtm/method_options/TestUseRTMLockElidingOption.java
> Passed: compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java
> Test results: passed: 30
> 
> ** POWER7 wo/ CPU and OS supporting RTM **
> Passed: 
> compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig.java 
> 
> Passed: compiler/rtm/cli/TestRTMAbortThresholdOption.java
> Passed: compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java
> Passed: compiler/rtm/cli/TestRTMLockingThresholdOption.java
> Passed: compiler/rtm/cli/TestRTMRetryCountOption.java
> Passed: compiler/rtm/cli/TestRTMSpinLoopCountOption.java
> Passed: compiler/rtm/cli/TestUseRTMDeoptOptionOnUnsupportedConfig.java
> Passed: 
> compiler/rtm/cli/TestUseRTMForStackLocksOptionOnUnsupportedConfig.java
> Passed: compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java
> Passed: compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java
> Test results: passed: 10
> 


More information about the hotspot-compiler-dev mailing list