-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8349088: De-virtualize Codeblob and nmethod #23533
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
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
11abd5e
8349088: De-virtualize Codeblob and nmethod
vnkozlov dda20f0
Fix Zero and Minimal VM builds
vnkozlov 43ae0ed
Add CodeBlob proxy vtable
vnkozlov 7d3dce0
Fix Minimal and Zero VM builds again
vnkozlov 1d10834
Fix Minimal and Zero VM builds once more
vnkozlov b09ddce
Fix Zero VM build
vnkozlov ed25d03
Merge branch 'master' into 8349088
vnkozlov 515495b
Update SA based on comments
vnkozlov 61fdee6
rename SA argument
vnkozlov 89a383e
Address comments
vnkozlov 3fdf1c8
Remove commented lines left by mistake
vnkozlov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is it worth considering generating this code plus also some of the existing code in the header using an iterator template macro? e.g.
The macro arguments to the templates would themselves be macros:
Using a template macro like this to generate the code below -- plus also some of the code currently declared piecemeal in the header -- would guarantee all cases are covered now and will remain so later so when the macro is updated. I think it would probably also allow case handling code in AOT cache code to be generated.
So, we would generate the code here as follows
Likewise in codeBlob.hpp we could generate
enum CodeBlobKindto cover all the non-abstract classes and likewise generate the accessor methodsis_nmethod(),is_buffer_blob()in classCodeBlobwhich allow the kind to be tested.There may be other opportunities to use the iterator (e.g. in vmStructs.cpp?) but this looks like a good start.
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.
Thank you @adinn for suggestion but no, I don't like macros - hard to debug and they add more complexity in this case.
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.
Sure, understood!