-
Notifications
You must be signed in to change notification settings - Fork 48
Update nmethod caching and clean up unused/duplicate methods #71
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: premain
Are you sure you want to change the base?
Conversation
Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
👋 Welcome back asmehra! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
Webrevs
|
Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
strings Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
uint _blob_offset; // Start of archived blob in the cache | ||
uint _code_offset; // Start of code for an entry of type "Stub" |
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.
Why you need 2 different fields for offset?
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.
I did this only for the clarity - using _blob_offset
is for storing Stubs doesn't sound correct, so I added _code_offset
for the Stubs. If it is confusing, I can keep _blob_offset
and remove the _code_offset
field.
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.
I would suggest to use old _code_ofset
for now. As we discussed on meeting we will need separate _metadata_offset to move all data describing code so we can map whole section of codes directly into CodeCache.
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.
Or we can compromise: _codeblob_offset, _codeblob_size
Stubs are also using CodeBlob. I don't get why you treat stubs differently.
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.
StubGenerator Stubs used CodeBlob, but in AOT CodeCache we don't store their CodeBlobs as we do for adapters/runtime blobs. We instead only copy the assembly code for each stub.
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.
We don't yet store a blob because we are just archiving a couple of special case stubs. But when we rework multi-stub save and restore for each of the stubgen stub groups (initial, cont, etc) then we should probably store/retrieve the code for all stubs in a group as a complete blob.
n.b. I say probably because we have to think about the case where we have errors loading code for a given stubgen blob or where the stubs we need at runtime include code that was not embedded in the saved blob at assembly time (i.e. because of changes on the command line). In the former case we would have to invalidate the loaded blob and recreate a new blob. In the latter we would have to generate missing code into a code buffer and create a secondary blob after we finish loading+generating.
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.
For now I agree with Vladimir - just use code_offset and code_size.
Before I start testing and approve it I think we should wait your fix JDK-8358330 integration (my testing is still running) and then merge from mainline to premain. |
_loaded = false; | ||
_not_entrant = false; | ||
_load_fail = false; | ||
_ignore_decompile = true; |
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.
This leaves field _ignore_decompile
uninitialized. Should you be setting it to false
here?
uint _blob_offset; // Start of archived blob in the cache | ||
uint _code_offset; // Start of code for an entry of type "Stub" |
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.
We don't yet store a blob because we are just archiving a couple of special case stubs. But when we rework multi-stub save and restore for each of the stubgen stub groups (initial, cont, etc) then we should probably store/retrieve the code for all stubs in a group as a complete blob.
n.b. I say probably because we have to think about the case where we have errors loading code for a given stubgen blob or where the stubs we need at runtime include code that was not embedded in the saved blob at assembly time (i.e. because of changes on the command line). In the former case we would have to invalidate the loaded blob and recreate a new blob. In the latter we would have to generate missing code into a code buffer and create a secondary blob after we finish loading+generating.
uint _blob_offset; // Start of archived blob in the cache | ||
uint _code_offset; // Start of code for an entry of type "Stub" |
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.
For now I agree with Vladimir - just use code_offset and code_size.
And we need to fix bootstrap sequence: JDK-8358690 and #75 |
Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
…alled before their destructor Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
This PR updates nmethod caching to be based on caching of CodeBlob. It also cleans up some dead code and duplicate methods.
Progress
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/leyden.git pull/71/head:pull/71
$ git checkout pull/71
Update a local copy of the PR:
$ git checkout pull/71
$ git pull https://git.openjdk.org/leyden.git pull/71/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 71
View PR using the GUI difftool:
$ git pr show -t 71
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/leyden/pull/71.diff
Using Webrev
Link to Webrev Comment