JDK-8310566 : JitTester-generated test requires 30x more time in Xcomp-mode
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 21
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2023-06-21
  • Updated: 2023-06-22
  • Resolved: 2023-06-22
Related Reports
Duplicate :  
Description
I am not sure if that is really a problem, so feel free to close if it isn't. The -Xint execution takes 9s on my laptop, while running with -Xcomp it's 4:30. 30 times more.

The test causes StackOverflow, just in case.

To run, first compile:
${JAVA_HOME}/bin/javac \
    -sourcepath $open/test/hotspot/jtreg:$open/test/lib:$open/test/hotspot/jtreg/testlibrary/jittester/src \
    -d target \
    Test_251.java

... and perform two runs:

${JAVA_HOME}/bin/java -cp target -Xint Test_25
${JAVA_HOME}/bin/java -cp target -Xcomp Test_25
Comments
Thanks, [~thartmann]. I've just tried with the JDK16, but it is not possible to compile as the test (and JITTester in general) uses new core libraries intensively. Given the very similar symptoms and that we both measured 30x increase, I think this case can be closed in favour of the earlier one.
22-06-2023

I think this is expected as -Xcomp implies -Xbatch, i.e., we stop execution when compilation is triggered and wait for it to finish, and we compile *all* methods. It could also be that JDK-8308103 is worsening the situation though. Did you check if older Java versions are affected as well?
22-06-2023