-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8362968: [JVMCI] support modifying locals in StackIntrospection on virtual threads #26422
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back never! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@tkrodriguez The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
@tkrodriguez Thank you for working on this! I'll look at the JVMTI and related changes but it is going to take some time. |
For the traditional usage, in the debugger, then it's not clear to me if it's worth having JVMTI deferred locals work with virtual threads. In the debugger it should be rare to want to change a local that is not in the top frame. So I think this is more about the Truffle usage. |
I think it would be as likely as wanting to change a local that is not in the top frame for a platform thread. |
That doesn't necessarily have to be addressed in this PR. If this change lands then in the future it would be possible to support it in JVMTI with some minor additional changes. If there was stronger interest in supporting JVMTI with this change then it would be additional motivation for the changes. |
@AlanBateman I don't know all the details of stackChunkOop management and one of my assumptions is that JavaThread::exit would have the chance to clean up any live frames that have jvmtiDeferredLocals. Otherwise we would leak this storage. Is that a reasonable assumption or is it possible for a virtual JavaThread to just be reclaimed by GC? |
This a draft of adding support for JVMTI deferred locals on virtual threads. The JDK issue has a more full description but basically I'd like some feedback on whether the strategy seems ok and whether full JVMTI support for deferred locals would be a desired outcome. If it's not then I might be able to recast this in a way that is more JVMCI specific so it requires fewer changes to the core JVMTI deferred locals support which is probably the scariest looking part. Maybe @AlanBateman and @kevinjwalls could offer some opinions here?
For the deopt/loom interactions I tried to make the use of the chunk for heap frames fairly explicit as the absolutized heap frames make me nervous. But maybe I'm just making it too complicated?
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26422/head:pull/26422
$ git checkout pull/26422
Update a local copy of the PR:
$ git checkout pull/26422
$ git pull https://git.openjdk.org/jdk.git pull/26422/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26422
View PR using the GUI difftool:
$ git pr show -t 26422
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26422.diff