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

Skip methods with JvmtiMountTransition annotation in findDecompileInfo #17855

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

babsingh
Copy link
Contributor

Java methods tagged with the JvmtiMountTransition annotation are
involved in transitioning between carrier to virtual threads, and
vice-versa.

These methods are not part of the thread's scope. So, they are skipped
during introspection by the following JVMTI functions:

  • ForceEarlyReturn
  • NotifyFramePop
  • Local Variable (GetOrSetLocal)

This PR allows us to match the RI in jvmti/vthread/MethodExitTest.

Related #17490

Closes #17758

@babsingh
Copy link
Contributor Author

@gacholio Requesting your review. This replaces #17758 and includes your feedback.

@babsingh babsingh requested a review from gacholio July 25, 2023 14:02
@gacholio
Copy link
Contributor

gacholio commented Jul 25, 2023

Ah, findDecompileInfo is a misleading name. I believe this is OK.

@gacholio
Copy link
Contributor

Are the stack trace APIs not affected by the annotation?

Java methods tagged with the JvmtiMountTransition annotation are
involved in transitioning between carrier to virtual threads, and
vice-versa. These methods are not part of the thread's scope. So,
they are skipped during introspection by the following JVMTI
functions:
- ForceEarlyReturn
- NotifyFramePop
- Local Variable (GetOrSetLocal)

This PR allows us to match the RI in jvmti/vthread/MethodExitTest.

Related eclipse-openj9#17490

Closes eclipse-openj9#17758

Co-authored-by: Gengchen Tuo <gengchen.tuo@ibm.com>
Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
@babsingh
Copy link
Contributor Author

Are the stack trace APIs not affected by the annotation?

The JvmtiMountTransition annotation only impacts JVMTI functions. It doesn't impact other stack trace APIs.

@gacholio
Copy link
Contributor

gacholio commented Jul 26, 2023

The JvmtiMountTransition annotation only impacts JVMTI functions. It doesn't impact other stack trace APIs.

There are stack trace APIs in JVMTI - the depth of frames will now not match (i.e. get a stack trace, find a method at depth 3, then try to use one of the APIs modified here, and fail because the depth is off due to an annotated method).

@gacholio
Copy link
Contributor

jenkins test sanity alinux64 jdk21

@babsingh
Copy link
Contributor Author

There are stack trace APIs in JVMTI - the depth of frames will now not match (i.e. get a stack trace, find a method at depth 3, then try to use one of the APIs modified here, and fail because the deoth is off due to an annotated method).

Yes. We will need to apply this change to all places where walkStackFrames is used in JVMTI functions. Will address this in a follow up PR.

Previously, I confused it with the Java stack trace APIs.

@gacholio gacholio merged commit 6140e2f into eclipse-openj9:master Jul 26, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants