JDK-8302149 : Speed up compiler/jsr292/methodHandleExceptions/TestAMEnotNPE.java
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 21
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-02-09
  • Updated: 2023-12-15
  • Resolved: 2023-02-27
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 17 JDK 21
11.0.23-oracleFixed 17.0.11-oracleFixed 21 b12Fixed
Related Reports
Relates :  
Description
https://github.com/openjdk/jdk/blame/master/test/hotspot/jtreg/compiler/jsr292/methodHandleExceptions/TestAMEnotNPE.java

This test takes 22seconds, and is one of the slowest tier1 compiler tests.

Can we speed it up? If no: can we move it to a higher tier to run it less often?
Comments
[jdk11u-fix-request] Approval Request from Amos “Backporting for parity with jdk 11.0.23-oracle. No risk, test fix. Clean backport. SAP nightlies passed on 2023-12-14”
14-12-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/2366 Date: 2023-12-13 05:12:55 +0000
13-12-2023

Fix request [17u] I backport this for parity with 17.0.11-oracle. No risk, only a test change. Clean backport. Test passes. SAP nightly testing passed.
30-11-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1995 Date: 2023-11-29 14:21:25 +0000
29-11-2023

Changeset: 2613b94f Author: Emanuel Peter <epeter@openjdk.org> Date: 2023-02-27 07:16:59 +0000 URL: https://git.openjdk.org/jdk/commit/2613b94f2863f54af22929ca8b5fef290e256ba1
27-02-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/12536 Date: 2023-02-13 14:50:16 +0000
14-02-2023

Yes, -XX:CompileCommand=compileonly,*::test seems to cover all interesting cases in the test.
10-02-2023

Thanks [~vlivanov]! So which methods exactly need to be compiled? Ah, I assume the methods created by the ClassWriter? Or should also the method handles be compiled? I'm not very familiar with that stuff. Would this not still allow everything to be compiled: -XX:CompileCommand=compileonly,* Maybe it needs to be at least: -XX:CompileCommand=compileonly,*::test
10-02-2023

Seems like -Xcomp mode is the offender: #section:main ----------messages:(7/451)---------- command: main -Xcomp compiler.jsr292.methodHandleExceptions.TestAMEnotNPE reason: User specified action: run main/othervm -Xcomp compiler.jsr292.methodHandleExceptions.TestAMEnotNPE started: Thu Feb 09 10:10:27 PST 2023 Mode: othervm [/othervm specified] Additional options from @modules: --add-modules java.base --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED finished: Thu Feb 09 10:10:41 PST 2023 elapsed time (seconds): 14.063 Restricting compilation to generated test methods only (w/ -XX:CompileCommand=compileonly,*) should noticeably improve things.
09-02-2023

[~vlivanov] Do you have an idea about this?
09-02-2023