-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8241503: C2: Share MacroAssembler between mach nodes during code emission #16484
Conversation
👋 Welcome back cslucas! A progress list of the required criteria for merging this PR into |
@JohnTortugo 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. |
Webrevs
|
PPC64 runs into assert(masm->inst_mark() == nullptr) failed: should be. |
@TheRealMDoerr - this is likely because of some missing |
Hello, I guess you might want to merge latest jdk master and add more changes.
|
@RealFYang - Thanks for the note. I'll do that and update the PR. |
|
Thank you for helping with test @TheRealMDoerr @offamitkumar @RealFYang . I working on an update and I'll push it today or soon after. |
@JohnTortugo this pull request can not be integrated into git checkout reuse-macroasm
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
Merge remote-tracking branch 'origin/master' into reuse-macroasm
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 should update the copyright year for the following files:
src/hotspot/cpu/aarch64/gc/x/x_aarch64.ad
src/hotspot/cpu/arm/arm_32.ad
src/hotspot/cpu/ppc/gc/x/x_ppc.ad
src/hotspot/cpu/riscv/gc/x/x_riscv.ad
src/hotspot/cpu/x86/c2_intelJccErratum_x86.hpp
src/hotspot/cpu/x86/gc/x/x_x86_64.ad
src/hotspot/cpu/x86/x86_32.ad
src/hotspot/share/opto/c2_CodeStubs.hpp
src/hotspot/share/opto/constantTable.hpp
Thanks for the update. The RISC-V part looks fine to me. I did release release build and ran tier1-3 tests on linux-riscv64 platform. |
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 have done testing on s390 (z15) with: {fastdebug, slowdebug, release} X {tier1}
and haven't seen new failure appearing due to this change.
Rest of review leave to @RealLucy :-)
Hi! Your change has conflict with current jdk master. Please rebase. |
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.
s390 changes look good to me.
FYI. Something goes wrong with the change on ARM32.
|
Thanks for testing @bulasevich . I'm going to take a look and get back to you asap. |
@bulasevich - Is the test that failed one of JDK jtreg tests? Did you include any additional JVM parameter to run the test? |
This happens on VM startup with empty params (no test). |
Do you need help understanding the problem? The crash occurred because you removed the line // Call Runtime Instruction
instruct CallRuntimeDirect(method meth) %{
match(CallRuntime);
effect(USE meth);
ins_cost(CALL_COST);
format %{ "CALL,runtime" %}
ins_encode( Java_To_Runtime( meth ),
call_epilog );
ins_pipe(simple_call);
%}
-->
void CallRuntimeDirectNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const {
cbuf.set_insts_mark();
// Start at oper_input_base() and count operands
unsigned idx0 = 1;
unsigned idx1 = 1; //
{
#line 1217 "/home/boris/jdk-bulasevich/src/hotspot/cpu/arm/arm.ad"
// CALL directly to the runtime
emit_call_reloc(cbuf, as_MachCall(), opnd_array(1), runtime_call_Relocation::spec());
#line 999999
}
{
#line 1213 "/home/boris/jdk-bulasevich/src/hotspot/cpu/arm/arm.ad"
// nothing
#line 999999
}
} |
It's hard for me to debug because I don't have direct access to an ARM32. However, I was able to reproduce the problem and I know the reason why it happens (its exactly what you described). I'm working now to find the correct locations to insert the |
@bulasevich - I just pushed a fix for ARM32. Can you please run your tests again? Thanks! |
Good. Tests are OK now. |
Thank you all for reviewing!! |
/integrate |
@JohnTortugo |
/sponsor |
Going to push as commit 31ee510.
Your commit was automatically rebased without conflicts. |
@TheRealMDoerr @JohnTortugo Pushed as commit 31ee510. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Description
Please review this PR with a patch to re-use the same C2_MacroAssembler object to emit all instructions in the same compilation unit.
Overall, the change is pretty simple. However, due to the renaming of the variable to access C2_MacroAssembler, from
_masm.
tomasm->
, and also some method prototype changes, the patch became quite large.Help Needed for Testing
I don't have access to all platforms necessary to test this. I hope some other folks can help with testing on
S390
,RISC-V
andPPC
.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/16484/head:pull/16484
$ git checkout pull/16484
Update a local copy of the PR:
$ git checkout pull/16484
$ git pull https://git.openjdk.org/jdk.git pull/16484/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 16484
View PR using the GUI difftool:
$ git pr show -t 16484
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/16484.diff
Webrev
Link to Webrev Comment