-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8369238: Allow virtual thread preemption on some common class initialization paths #27802
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
Open
pchilano
wants to merge
18
commits into
openjdk:master
Choose a base branch
from
pchilano:JDK-8369238
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,059
−426
Open
Changes from 2 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
60cbca4
v1
pchilano 88844bf
Fix whitespaces
pchilano d035366
RISC-V support
pchilano 79fce80
Merge branch 'master' into JDK-8369238
pchilano ac55715
fix verify_frame_kind
pchilano 9f4436a
Use ClassInitMode and shorter enum names
pchilano 30bdf49
Extra comments from David
pchilano 6882db0
Remove extra debugging param
pchilano 6000edb
PPC support
pchilano a943c83
define methods in resolve_from_cache with TRAPS and use CHECK_AND_CLE…
pchilano 0e483ba
Extra comments from Coleen
pchilano 2786b1d
rename _monitor to _init_lock
pchilano bea5620
More comments from Coleen
pchilano 1312486
Improve comment in anchor_mark_set_pd
pchilano 3bf8ebd
add const to references
pchilano 4cecd7e
Merge branch 'master' into JDK-8369238
pchilano c7d6f5c
More fixes from David's comments
pchilano ffcd92a
Improve comment and assert msg
pchilano 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
Some comments aren't visible on the classic Files Changed page.
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -189,10 +189,10 @@ class LinkInfo : public StackObj { | |
| void print() PRODUCT_RETURN; | ||
| }; | ||
|
|
||
| enum class StaticMode : uint8_t { | ||
| dont_initialize_klass, | ||
| initialize_klass, | ||
| initialize_klass_preemptable | ||
| enum class ClassInitMode : uint8_t { | ||
|
||
| dont_init, | ||
| init, | ||
| init_preemptable | ||
| }; | ||
|
|
||
| // Link information for getfield/putfield & getstatic/putstatic bytecodes | ||
|
|
@@ -273,7 +273,7 @@ class LinkResolver: AllStatic { | |
|
|
||
| // runtime resolving from constant pool | ||
| static void resolve_invokestatic (CallInfo& result, | ||
| const constantPoolHandle& pool, int index, StaticMode mode, TRAPS); | ||
| const constantPoolHandle& pool, int index, ClassInitMode mode, TRAPS); | ||
| static void resolve_invokespecial (CallInfo& result, Handle recv, | ||
| const constantPoolHandle& pool, int index, TRAPS); | ||
| static void resolve_invokevirtual (CallInfo& result, Handle recv, | ||
|
|
@@ -301,22 +301,21 @@ class LinkResolver: AllStatic { | |
| int index, | ||
| const methodHandle& method, | ||
| Bytecodes::Code byte, | ||
| StaticMode mode, TRAPS); | ||
| ClassInitMode mode, TRAPS); | ||
| static void resolve_field_access(fieldDescriptor& result, | ||
| const constantPoolHandle& pool, | ||
| int index, | ||
| const methodHandle& method, | ||
| Bytecodes::Code byte, TRAPS) { | ||
| resolve_field_access(result, pool, index, method, byte, | ||
| StaticMode::initialize_klass, THREAD); | ||
| resolve_field_access(result, pool, index, method, byte, ClassInitMode::init, THREAD); | ||
| } | ||
| static void resolve_field(fieldDescriptor& result, const LinkInfo& link_info, | ||
| Bytecodes::Code access_kind, | ||
| StaticMode mode, TRAPS); | ||
| ClassInitMode mode, TRAPS); | ||
|
|
||
| static void resolve_static_call (CallInfo& result, | ||
| const LinkInfo& link_info, | ||
| StaticMode mode, TRAPS); | ||
| ClassInitMode mode, TRAPS); | ||
| static void resolve_special_call (CallInfo& result, | ||
| Handle recv, | ||
| const LinkInfo& link_info, | ||
|
|
@@ -358,11 +357,11 @@ class LinkResolver: AllStatic { | |
| // runtime resolving from constant pool | ||
| static void resolve_invoke(CallInfo& result, Handle recv, | ||
| const constantPoolHandle& pool, int index, | ||
| Bytecodes::Code byte, StaticMode static_mode, TRAPS); | ||
| Bytecodes::Code byte, ClassInitMode static_mode, TRAPS); | ||
| static void resolve_invoke(CallInfo& result, Handle recv, | ||
| const constantPoolHandle& pool, int index, | ||
| Bytecodes::Code byte, TRAPS) { | ||
| resolve_invoke(result, recv, pool, index, byte, StaticMode::initialize_klass, THREAD); | ||
| resolve_invoke(result, recv, pool, index, byte, ClassInitMode::init, THREAD); | ||
| } | ||
|
|
||
| // runtime resolving from attached method | ||
|
|
||
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
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
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
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
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
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.
Why is this not CHECK_AND_CLEAR_PREEMPTED?
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 need to let the exception propagate all the way back to the VM entry point, and only then we can clear it.
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.
Right - sorry - I though this was the entry point, but it is up in IRT.