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
8257423: [PPC64] Support -XX:-UseInlineCaches #1521
8257423: [PPC64] Support -XX:-UseInlineCaches #1521
Conversation
|
@TheRealMDoerr The following label 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 list. If you would like to change these labels, use the /label pull request command. |
Hi Martin,
this looks good to my non-compiler-eyes.
Cheers, Thomas
} else { | ||
// Determine by scratch emit. | ||
ResourceMark rm; | ||
int code_size = 8 * BytesPerInstWord; |
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 this enough? Can CodeBuffers expand?
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.
Maximum size is 7 instructions.
ResourceMark rm; | ||
int code_size = 8 * BytesPerInstWord; | ||
CodeBuffer cb("decode_klass_not_null scratch buffer", code_size, 0); | ||
MacroAssembler* a = new MacroAssembler(&cb); |
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.
Idle thought: if this is done frequently, maybe MacroAssembler could have a "dry run" mode with no attached CodeBuffer, just counting instructions.
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.
The scratch emit is only executed during the first call. Afterwards, the computed_size is just returned and we don't call the CodeBuffer constructor any more.
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 just asked myself how this is thread safe then. Well it is not. The scratch emit ist executed at most once /per thread/ ;)
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.
Interesting point. Right, it doesn't have to be thread safe. All threads which compute it concurrently will compute the same result.
@TheRealMDoerr This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 106 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
Thanks for reviewing it! |
ResourceMark rm; | ||
int code_size = 8 * BytesPerInstWord; | ||
CodeBuffer cb("decode_klass_not_null scratch buffer", code_size, 0); | ||
MacroAssembler* a = new MacroAssembler(&cb); |
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 just asked myself how this is thread safe then. Well it is not. The scratch emit ist executed at most once /per thread/ ;)
Thanks a lot for the reviews! |
@TheRealMDoerr Since your change was applied there have been 106 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 1d2d981. |
The JVM currently runs into Unimplemented() when using -XX:-UseInlineCaches in C2 code (postalloc_expand_java_dynamic_call_sched).
I'd like to enable the existing code in postalloc_expand_java_dynamic_call_sched and fix MachCallDynamicJavaNode::ret_addr_offset() and MacroAssembler::instr_size_for_decode_klass_not_null().
I suggest to use scratch emit to determine the size, because there are too many cases and emitting it once is fast.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1521/head:pull/1521
$ git checkout pull/1521