Support HotSpotDiagnosticMXBean in OpenJ9 JDK21+ - #17709
Conversation
|
It seems this will enable other HotSpotDiagnosticMXBean APIs which aren't going to work on OpenJ9. What happens when they are called? We may need to do something so they fail gracefully, such as throw an appropriate exception. getDiagnosticOptions() |
|
Does the use of HotSpotDiagnosticMXBean require |
Initially, I thought it was only Java code. After running some JTReg tests, these methods also rely upon native methods which are not implemented in OpenJ9. So, I will add an override similar to |
I don't believe that it requires |
4dd830d to
46460ea
Compare
|
All feedback comments have been addressed. |
46460ea to
3c5d345
Compare
|
Previous feedback has been addressed: removed the module check and added error handling as per the Javadoc. |
|
What test suite(s) did you run already? |
3c5d345 to
5daea5b
Compare
JDK21: JDK17: Ran the disabled test locally. Also, accounted for the recent feedback: an empty list is returned and exception messages have been updated. |
|
jenkins test extended amac jdk11,jdk21 |
This will allow us to enable a JTReg test for Structured Concurrency. JTReg test: StructuredTaskScope/StructuredThreadDumpTest Related: eclipse-openj9#17634 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
5daea5b to
346a572
Compare
|
Old PR builds: https://openj9-jenkins.osuosl.org/job/PullRequest-OpenJ9/4025/. No issues seen during local testing with the latest changes. |
| create(OPENJ9_DIAGNOSTICS_MXBEAN_NAME, openj9.lang.management.internal.OpenJ9DiagnosticsMXBeanImpl.getInstance()) | ||
| .addInterface(openj9.lang.management.OpenJ9DiagnosticsMXBean.class) | ||
| .validateAndRegister(); |
There was a problem hiding this comment.
Please help me understand why this was removed. This code is specific to Java 8 where there's no possibility that OpenJ9DiagnosticsMXBeanImpl.getInstance() might return null (even though the code would properly handle that situation). Why do we no longer want this bean to be registered?
There was a problem hiding this comment.
Ah good catch, I missed it was specific to 8 (and we didn't test 8). So we need to add it back and add the HotspotBean there too.
There was a problem hiding this comment.
Opened #17726 to readd the registration calls.
The registration call was removed in eclipse-openj9#17709 due to a false assumption. It has been added back since it is still required. Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
eclipse-openj9/openj9#17709 adds the required support to enable StructuredThreadDumpTest. Related issues which can be closed after the test is enabled: - eclipse-openj9/openj9#17634 - eclipse-openj9/openj9#15278 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
eclipse-openj9/openj9#17709 adds the required support to enable StructuredThreadDumpTest. Related issues which can be closed after the test is enabled: - eclipse-openj9/openj9#17634 - eclipse-openj9/openj9#15278 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
This will allow us to enable a JTReg test for Structured Concurrency.
JTReg test: StructuredTaskScope/StructuredThreadDumpTest
Related: #17634