-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8322630: Remove ICStubs and related safepoints #17495
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
Changes from 1 commit
cc98cce
82134e6
140a8a1
2ee554e
a8cfe40
49758bf
707b271
7012996
fc04a60
60fa659
5487777
ba5a4dc
42a2198
6dd64b5
01733b8
dfdcdcc
08c146b
29790af
2999428
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -753,6 +753,9 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm | |
|
|
||
| { | ||
| __ block_comment("c2i_unverified_entry {"); | ||
| // Method might have been compiled since the call site was patched to | ||
| // interpreted; if that is the case treat it as a miss so we can get | ||
| // the call site corrected. | ||
| __ ic_check(1 /* end_alignment */); | ||
| __ ldr(rmethod, Address(data, CompiledICData::speculated_method_offset())); | ||
|
|
||
|
|
@@ -1548,6 +1551,8 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, | |
| __ clinit_barrier(rscratch2, rscratch1, &L_skip_barrier); | ||
| __ far_jump(RuntimeAddress(SharedRuntime::get_handle_wrong_method_stub())); | ||
|
|
||
| // Verified entry point must be aligned | ||
|
||
|
|
||
| __ bind(L_skip_barrier); | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -817,7 +817,8 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, | |
|
|
||
| const Register receiver = R0; // see receiverOpr() | ||
| __ verify_oop(receiver); | ||
| __ ic_check(1 /* end_alignment */); | ||
| // Inline cache check | ||
| __ ic_check(CodeEntryAlignment /* end_alignment */); | ||
|
|
||
| int vep_offset = __ pc() - start; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add back There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. |
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1358,6 +1358,10 @@ int MacroAssembler::ic_check(int end_alignment) { | |
| Register data = rax; | ||
| Register temp = LP64_ONLY(rscratch1) NOT_LP64(rbx); | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice if VerifyOops check could be added back, maybe as a follow-up RFE? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good idea. |
||
| // The UEP of a code blob ensures that the VEP is padded. However, the padding of the UEP is placed | ||
| // before the inline cache check, so we don't have to execute any nop instructions when dispatching | ||
| // through the UEP, yet we can ensure that the VEP is aligned appropriately. That's why we align | ||
| // before the inline cache check here, and not after | ||
| align(end_alignment, offset() + ic_check_size()); | ||
|
|
||
| int uep_offset = offset(); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3413,6 +3413,9 @@ void PhaseOutput::install_code(ciMethod* target, | |
| _code_offsets.set_value(CodeOffsets::OSR_Entry, _first_block_size); | ||
| } else { | ||
| if (!target->is_static()) { | ||
| // The UEP of an nmethod ensures that the VEP is padded. However, the padding of the UEP is placed | ||
| // before the inline cache check, so we don't have to execute any nop instructions when dispatching | ||
| // through the UEP, yet we can ensure that the VEP is aligned appropriately. | ||
| _code_offsets.set_value(CodeOffsets::Entry, _first_block_size - MacroAssembler::ic_check_size()); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks tricky. I think it means CodeOffsets::Entry starts after the alignment padding NOPs. If that's true then the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes that's exactly it. I found that I got a less fortunate nop encoding that actually did show up as a tiny regression. It was fixed by not running the nops. I'll write a comment. |
||
| } | ||
| _code_offsets.set_value(CodeOffsets::Verified_Entry, _first_block_size); | ||
|
|
||
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.
It would be nice if we could still call
verify_oop(receiver)here, but I see that would complicateic_check_size().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.
Yeah I thought the same. As it's important for correctness that ic_check_size is accurate, I was hoping to have as few different modes in it as possible.