-
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
OffHeap CardMarking using the baseObj instead of dataAddr #20264
base: master
Are you sure you want to change the base?
Conversation
|
When evaluating Unsafe.CAS while running with Balanced GC and OffHeap enabled, if the object child is the dataAddrPointer load, pass the baseObj to VMCardCheckEvaluator for correct card marking. The dstReg and temp2Reg in VMCardCheckEvaluator can share a reg. Signed-off-by: Abdulrahman Alattas <[email protected]>
When running with Balanced GC and OffHeap enabled, if the destOwningObject is a dataAddrPointer load, use the baseObj as the owningObjectReg. Signed-off-by: Abdulrahman Alattas <[email protected]>
When evaluating Unsafe.CAS while running with Balanced GC and OffHeap enabled, if the object child is the dataAddrPointer load, pass the baseObj to VMCardCheckEvaluator for correct card marking. The dstReg and temp2Reg in VMCardCheckEvaluator can share a reg, adding the argument clobberDstReg to indicate if dstReg can be used as the temp2Reg. Not allocating temp2Reg and adding a dep for baseObjReg uses the same number of registers. Signed-off-by: Abdulrahman Alattas <[email protected]>
When evaluating Unsafe.CAS while running with Balanced GC and OffHeap enabled, if the object child is the dataAddrPointer load, pass the baseObj to VMCardCheckEvaluator for correct card marking. Using the VMCardCheckEvaluator ability to clobberDstReg, we use baseObjReg instead of the temp epReg. Signed-off-by: Abdulrahman Alattas <[email protected]>
@r30shah, I don't have a IBM Java 8 with OffHeap to test, but it seem that its not an issue given that the dstObject for The dataAddr load is for arrays, if the dstObject is a
Full Instruction Selection
|
When evaluating Unsafe.CAS, the card marking uses the dstObj to calculate the card entry to dirty.
With OffHeap the dstObj is a dataAddrPointer load of the baseObj:
This PR changes that to use the correct baseObj to calculate the card entry to dirty.
The change uses the temp registers to not use more registers for the code sequence.
TODO:
(Given that the dstObj is not an array, no dataAddr load will be present)inlineConcurrentLinkedQueueTMOffer
(Given that the dstObj is not an array, no dataAddr load will be present)inlineConcurrentLinkedQueueTMPoll
arraycopyEvaluator
needs the change on all platforms [1].[1]
For arraycopy, currently the optimizer uses the baseObj as the dstObj child, and loads the dataAddr in the dstAddr child. As card marking uses the dstObj child for the card entry calculation, it's correct. I just need to confirm that this is always the case.