-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support HotSpotDiagnosticMXBean in OpenJ9 JDK21+ #17709
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() |
...src/java.management/share/classes/com/ibm/java/lang/management/internal/ManagementUtils.java
Outdated
Show resolved
Hide resolved
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. |
...src/jdk.management/share/classes/com/ibm/lang/management/internal/PlatformMBeanProvider.java
Outdated
Show resolved
Hide resolved
jcl/src/jdk.management/share/classes/com/sun/management/internal/ExtendedHotSpotDiagnostic.java
Outdated
Show resolved
Hide resolved
jcl/src/jdk.management/share/classes/com/sun/management/internal/ExtendedHotSpotDiagnostic.java
Outdated
Show resolved
Hide resolved
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? |
jcl/src/jdk.management/share/classes/com/sun/management/internal/ExtendedHotSpotDiagnostic.java
Outdated
Show resolved
Hide resolved
jcl/src/jdk.management/share/classes/com/sun/management/internal/ExtendedHotSpotDiagnostic.java
Outdated
Show resolved
Hide resolved
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 |
jcl/src/jdk.management/share/classes/com/sun/management/internal/ExtendedHotSpotDiagnostic.java
Outdated
Show resolved
Hide resolved
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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