Skip to content
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

[JDK19] JVMTI VirtualThread[Mount|UnMount] Events #16167

Closed
babsingh opened this issue Oct 21, 2022 · 7 comments
Closed

[JDK19] JVMTI VirtualThread[Mount|UnMount] Events #16167

babsingh opened this issue Oct 21, 2022 · 7 comments
Labels
comp:jvmti comp:vm jdk19 jdk20 project:loom Used to track Project Loom related work
Milestone

Comments

@babsingh
Copy link
Contributor

JVMTI VirtualThreadMount and VirtualThreadUnMount events are part of the JVMTI Extension API, which is not covered by the JVMTI documentation. So, they don't need to be supported for the current Java 19 milestone.

Their implementation will be similar to the VirtualThreadStart and VirtualThreadEnd events. VirtualThreadStart and VirtualThreadEnd events are only triggered during the first mount and last unmount respectively. But, VirtualThreadMount and VirtualThreadUnMount events will be triggered on each mount and unmount respectively.

The following JVMTI serviceability tests will need to be disabled until support for the VirtualThreadMount and VirtualThreadUnMount events is introduced:

vthread/BreakpointInYieldTest/libBreakpointInYieldTest.cpp
vthread/MethodExitTest/libMethodExitTest.cpp
vthread/NullAsCurrentThreadTest/libNullAsCurrentThreadTest.cpp
vthread/VThreadTest/libVThreadTest.cpp
vthread/VThreadUnsupportedTest/libVThreadUnsupportedTest.cpp
@babsingh
Copy link
Contributor Author

@babsingh babsingh changed the title JDK19: JVMTI VirtualThreadMount and VirtualThreadUnMount Events [JDK19] JVMTI VirtualThreadMount and VirtualThreadUnMount Events Oct 21, 2022
@babsingh babsingh changed the title [JDK19] JVMTI VirtualThreadMount and VirtualThreadUnMount Events [JDK19] JVMTI VirtualThread[Mount|UnMount] Events Oct 21, 2022
@pshipton
Copy link
Member

Is somebody taking care of excluding those tests?

@babsingh
Copy link
Contributor Author

@fengxue-IS Can you confirm if you plan to exclude the above tests while enabling the fixed tests?

@fengxue-IS
Copy link
Contributor

@fengxue-IS Can you confirm if you plan to exclude the above tests while enabling the fixed tests?

yes, I've created https://github.com/fengxue-IS/aqa-tests/tree/loom3 to address this, still testing to make sure it covers all cases

@babsingh
Copy link
Contributor Author

babsingh commented Nov 30, 2022

@dipak-bagadiya Can you look at this issue?

The solution will be similar to the VirtualThreadStart and VirtualThreadEnd events, which were implemented in #15254.

The only difference is that the VirtualThreadMount and VirtualThreadUnMount events are part of the JVMTI Extension API. Existing JVMTI extension events are implemented in jvmtiExtensionMechanism.c. Sample JVMTI extension events:

static const J9JVMTIExtensionEventInfo J9JVMTIExtensionEventInfoTable[] = {
{
J9JVMTI_EVENT_COM_IBM_COMPILING_START,
COM_IBM_COMPILING_START,
J9NLS_JVMTI_COM_IBM_COMPILING_START_DESCRIPTION,
SIZE_AND_TABLE(jvmtiCompilingStart_params),
},

fyi @fengxue-IS @tajila

babsingh pushed a commit to babsingh/openj9 that referenced this issue Jan 18, 2023
TODO: Add more details.

Related: eclipse-openj9#16167

Signed-off-by: Dipak Bagadiya <[email protected]>
babsingh added a commit to babsingh/openj9 that referenced this issue Feb 1, 2023
JVMTI VirtualThreadMount and VirtualThreadUnMount events are part of
the JVMTI Extension API which is not covered by the JVMTI
documentation.

The following JVMTI extension events are implemented:
- VirtualThreadmount: Trigger/Hook the Virtual thread mount event.
- VirtualThreadUnmount: Trigger/Hook the Virtual thread unmount event.

Related: eclipse-openj9#16167

Signed-off-by: Dipak Bagadiya <[email protected]>
Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9-openjdk-jdk19 that referenced this issue Feb 1, 2023
Currently, extension event numbers are hard-coded in the tests. This is
invalid since the extension event numbers can vary between
implementations. Instead, GetExtensionEvents should be used to derive
the extension event numbers.

Related: eclipse-openj9/openj9#16501
Related: eclipse-openj9/openj9#16167

Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9-openjdk-jdk19 that referenced this issue Feb 1, 2023
Currently, extension event numbers are hard-coded in the tests. This is
invalid since the extension event numbers can vary between
implementations. Instead, GetExtensionEvents should be used to derive
the extension event numbers.

Related: eclipse-openj9/openj9#16501
Related: eclipse-openj9/openj9#16167

Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9-openjdk-jdk19 that referenced this issue Feb 1, 2023
Currently, extension event numbers are hard-coded in the tests. This is
invalid since the extension event numbers can vary between
implementations. Instead, GetExtensionEvents should be used to derive
the extension event numbers.

Related: eclipse-openj9/openj9#16501
Related: eclipse-openj9/openj9#16167

Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9-openjdk-jdk19 that referenced this issue Feb 1, 2023
Currently, extension event numbers are hard-coded in the tests. This is
invalid since the extension event numbers can vary between
implementations. Instead, GetExtensionEvents should be used to derive
the extension event numbers.

Related: eclipse-openj9/openj9#16501
Related: eclipse-openj9/openj9#16167

Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9-openjdk-jdk20 that referenced this issue Feb 1, 2023
Currently, extension event numbers are hard-coded in the tests. This is
invalid since the extension event numbers can vary between
implementations. Instead, GetExtensionEvents should be used to derive
the extension event numbers.

Related: eclipse-openj9/openj9#16501
Related: eclipse-openj9/openj9#16167

Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9-openjdk-jdk that referenced this issue Feb 1, 2023
Currently, extension event numbers are hard-coded in the tests. This is
invalid since the extension event numbers can vary between
implementations. Instead, GetExtensionEvents should be used to derive
the extension event numbers.

Related: eclipse-openj9/openj9#16501
Related: eclipse-openj9/openj9#16167

Signed-off-by: Babneet Singh <[email protected]>
@babsingh
Copy link
Contributor Author

babsingh commented Feb 2, 2023

Reopening since the disabled tests still need to be re-enabled.

@babsingh babsingh reopened this Feb 2, 2023
babsingh added a commit to babsingh/openj9-openjdk-jdk that referenced this issue Feb 2, 2023
Currently, extension event numbers are hard-coded in the tests. This is
invalid since the extension event numbers can vary between
implementations. Instead, GetExtensionEvents should be used to derive
the extension event numbers.

Related: eclipse-openj9/openj9#16501
Related: eclipse-openj9/openj9#16167

Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9-openjdk-jdk that referenced this issue Feb 2, 2023
Currently, extension event numbers are hard-coded in the tests. This is
invalid since the extension event numbers can vary between
implementations. Instead, GetExtensionEvents should be used to derive
the extension event numbers.

Related: eclipse-openj9/openj9#16501
Related: eclipse-openj9/openj9#16167

Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9-openjdk-jdk that referenced this issue Feb 7, 2023
Currently, extension event numbers are hard-coded in the tests. This is
invalid since the extension event numbers can vary between
implementations. Instead, GetExtensionEvents should be used to derive
the extension event numbers.

Related: eclipse-openj9/openj9#16501
Related: eclipse-openj9/openj9#16167

Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9-openjdk-jdk20 that referenced this issue Feb 7, 2023
Currently, extension event numbers are hard-coded in the tests. This is
invalid since the extension event numbers can vary between
implementations. Instead, GetExtensionEvents should be used to derive
the extension event numbers.

Related: eclipse-openj9/openj9#16501
Related: eclipse-openj9/openj9#16167

Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9-openjdk-jdk19 that referenced this issue Feb 7, 2023
Currently, extension event numbers are hard-coded in the tests. This is
invalid since the extension event numbers can vary between
implementations. Instead, GetExtensionEvents should be used to derive
the extension event numbers.

Related: eclipse-openj9/openj9#16501
Related: eclipse-openj9/openj9#16167

Signed-off-by: Babneet Singh <[email protected]>
@babsingh
Copy link
Contributor Author

babsingh commented Apr 28, 2023

The JVMTI VirtualThread[Mount|UnMount] events were implemented in #16501.

For JDK20, no test is disabled due to this issue in https://github.com/adoptium/aqa-tests/blob/master/openjdk/excludes/ProblemList_openjdk20-openj9.txt.

Thus, closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jvmti comp:vm jdk19 jdk20 project:loom Used to track Project Loom related work
Projects
None yet
Development

No branches or pull requests

3 participants