-
Notifications
You must be signed in to change notification settings - Fork 720
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
AArch64: Implement read barrier evaluators #9542
Conversation
22c664c
to
2e82c6a
Compare
jenkins compile alinux64 jdk11 |
2e82c6a
to
476ffee
Compare
Related PR: eclipse-omr/omr#5224 |
476ffee
to
04c5954
Compare
The Travis CI build failure was not caused by this PR.
|
jenkins compile alinux64 jdk11 |
Try running system tests before enabling concurrent scavenger. |
jenkins test sanity.system alinux64 jdk11 |
The failure with TestIBMJlmRemoteMemoryAuth_0 is a known issue #9047. |
I manually ran the following tests for concurrent scavenger from openjdk-tests/system on cent7-aarch64-1 with my local build, and they all passed.
|
04c5954
to
66530ba
Compare
Minor update for avoiding compiler warnings. |
deps->addPostCondition(x0Reg, TR::RealRegister::x0); | ||
deps->addPostCondition(metaReg, TR::RealRegister::NoReg); | ||
|
||
tempMR = new (cg->trHeapMemory()) TR::MemoryReference(node, 4, cg); |
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.
What does the offset "4" represent? Perhaps use a more descriptive constant name.
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 is not an offset but a length parameter.
It is meaningless, and is addressed by eclipse-omr/omr#4137 .
|
||
generateLabelInstruction(cg, TR::InstOpCode::label, node, endLabel, deps); | ||
|
||
bool needSync = (node->getSymbolReference()->getSymbol()->isSyncVolatile() && cg->comp()->target().isSMP()); |
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.
Use the comp
variable that you cached earlier.
deps->addPostCondition(locationReg, TR::RealRegister::x1); // TR_softwareReadBarrier helper needs this in x1. | ||
deps->addPostCondition(evacuateReg, TR::RealRegister::NoReg); | ||
deps->addPostCondition(x0Reg, TR::RealRegister::x0); | ||
deps->addPostCondition(metaReg, TR::RealRegister::NoReg); |
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.
What does it mean to assign metaReg
to a NoReg dependence (i.e., any available real register)? Shouldn't this be the actual real register representing the vmThread?
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 came from the p version.
TR::Register *locationReg = cg->allocateRegister(); | ||
TR::Register *evacuateReg = cg->allocateRegister(); | ||
TR::Register *x0Reg = cg->allocateRegister(); | ||
TR::Register *metaReg = cg->getMethodMetaDataRegister(); |
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.
Can you call this metaDataReg
or more conventionally vmThreadReg
?
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.
Changed to vmThreadReg
.
generateLabelInstruction(cg, TR::InstOpCode::label, node, startLabel); | ||
|
||
generateTrg1MemInstruction(cg, TR::InstOpCode::ldrimmw, node, evacuateReg, | ||
new (cg->trHeapMemory()) TR::MemoryReference(metaReg, cg->comp()->fej9()->thisThreadGetEvacuateBaseAddressOffset(), cg)); |
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.
Use comp
here instead of cg->comp()
.
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.
Changed to comp
, here and other locations.
generateConditionalBranchInstruction(cg, TR::InstOpCode::b_cond, node, endLabel, TR::CC_LT); | ||
|
||
generateTrg1MemInstruction(cg, TR::InstOpCode::ldrimmw, node, evacuateReg, | ||
new (cg->trHeapMemory()) TR::MemoryReference(metaReg, cg->comp()->fej9()->thisThreadGetEvacuateTopAddressOffset(), cg)); |
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.
Use comp
here
generateSynchronizationInstruction(cg, TR::InstOpCode::dsb, node, 0xF); // dsb SY | ||
} | ||
|
||
cg->insertPrefetchIfNecessary(node, objReg); |
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 necessary? What are you prefetching here and why?
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 came from the p version. Removing.
} | ||
|
||
static TR::Register * | ||
aGenerateSoftwareReadBarrier(TR::Node *node, TR::CodeGenerator *cg) |
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 DNA of this method is about 80-90% identical to the iGenerateSoftwareReadBarrier method. Is there any way you could combine them to save some code space?
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.
Most of my comments in iGenerateSoftwareReadBarrier apply to this function as well so I'm not going to repeat them.
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.
Merged the two functions into generateSoftwareReadBarrier()
, which takes bool isArdbari
as its third argument.
This commit implements read barrier evaluators for AArch64. Signed-off-by: KONNO Kazuhiro <konno@jp.ibm.com>
66530ba
to
20bf33d
Compare
Reflected the review comments. |
jenkins compile alinux64 jdk11 |
I ran some of the load tests (mentioned above) with both compressed refs and large heap builds, and saw no failures. |
This commit implements read barrier evaluators for AArch64.
Signed-off-by: KONNO Kazuhiro konno@jp.ibm.com