JDK-8218178 : vmTestbase/vm/mlvm/mixed/stress/regression/b6969574/INDIFY_Test.java fails with -Xcomp
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 12,13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-01-31
  • Updated: 2023-11-28
  • Resolved: 2019-02-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12 JDK 13
11.0.22-oracleFixed 12 b31Fixed 13Fixed
Related Reports
Relates :  
Description
======== Results (absolute); warmups: 5; measurements: 10; iterations/run: 1000000; micro iterations: 5
### TRACE 1:                              Direct call:    69.2 ns (stddev:   2.4 =  3%) // 20.6 times FASTER than Reflection API Method.invoke()
### TRACE 1:           Reflection API Method.invoke():  1423.3 ns (stddev: 422.7 = 29%)
### TRACE 1:                         MH.invokeExact():    96.2 ns (stddev:   7.5 =  7%) // 14.8 times FASTER than Reflection API Method.invoke()
### TRACE 1:                              MH.invoke():    94.2 ns (stddev:   6.8 =  7%) // 15.1 times FASTER than Reflection API Method.invoke()
### TRACE 1:                invokedynamic instruction:    68.6 ns (stddev:   2.7 =  3%) // 20.7 times FASTER than Reflection API Method.invoke()
### TRACE 1: 
======== Conclusions
### TRACE 1: Comparing invocation time orders
#>  
#>  WARNING: switching log to verbose mode,
#>      because error is complained
#>  
# ERROR: Test marked failed at vm.mlvm.mixed.stress.regression.b6969574.INDIFY_Test.verifyTimeOrder(INDIFY_Test.java:297):
# ERROR: Reflection API Method.invoke() invocation time order (1423.3 ns) is greater than of MH.invokeExact()(96.2 ns)!
The following stacktrace is for failure analysis.
nsk.share.TestFailure: Test marked failed at vm.mlvm.mixed.stress.regression.b6969574.INDIFY_Test.verifyTimeOrder(INDIFY_Test.java:297): Reflection API Method.invoke() invocation time order (1423.3 ns) is greater than of MH.invokeExact()(96.2 ns)!

It seems like the failures show up with running with -Xcomp.
Comments
Fix request [11u] I backport this for parity with 11.0.22-oracle. No risk, only a test change. Clean backport. Test passes. SAP nightly testing passed.
27-11-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/2297 Date: 2023-11-24 06:09:54 +0000
24-11-2023

URL: http://hg.openjdk.java.net/jdk/jdk12/rev/ffac5eabbf28 User: iignatyev Date: 2019-02-01 21:34:14 +0000
01-02-2019

the fix is to compare indy w/ reflection instead of reflection w/ invokeExact: http://cr.openjdk.java.net/~iignatyev//8218178/webrev.00/index.html
01-02-2019

the test expects Method.invoke() <= MH.invokeExact(), and w/ Xcomp we might get MH.invokeExact < Method.invoke. as the test is a regression test for indy being slower than reflection, comparing MH::invokeExact results Method::invoke should be irrelevant for the test and using assumptions about their relation is wrong.
01-02-2019