DDR Changes for Off-Heap - #20111
Conversation
f2de1ae to
c62209d
Compare
| } | ||
| if (false == isCorrectDataAddrPointer) { | ||
|
|
||
| if (false == J9IndexableObjectHelper.hasCorrectDataAddrPointer(array)) { |
There was a problem hiding this comment.
no need to do false ==, just !
|
|
||
| if (dataSizeInBytes.isZero()) { | ||
| VoidPointer discontiguousDataAddr = VoidPointer.cast(arrayPtr.addOffset(J9IndexableObjectHelper.discontiguousHeaderSize())); | ||
| hasCorrectDataAddrPointer = (dataAddr.isNull() || dataAddr.equals(discontiguousDataAddr)); |
There was a problem hiding this comment.
We could be more strict if enableVirtualLargeObjectHeap is true, so that we disallow null.
Null is only possible in interim builds that don't have offheap code or in new builds with offheap disabled.
There was a problem hiding this comment.
actually, my comment was not correct. at least for interpreter, we will have it null.
| @@ -1194,19 +1194,8 @@ private int checkJ9Object(J9ObjectPointer object, GCHeapRegionDescriptor regionD | |||
| if (J9BuildFlags.J9VM_ENV_DATA64 && isIndexableDataAddressFlagSet() && ObjectModel.isIndexable(object)) { | |||
| if (!_javaVM.isIndexableDataAddrPresent().isZero()) { | |||
There was a problem hiding this comment.
try to check if offheap is enabled here, and proceed with per object check only if it's enabled
if it's disabled we don't really need to do any check against dataAddr (even random value is ok, even though, it might be set properly by interpreter or often, but not alway zeroed by JIT).
|
|
||
| UDATA heapAddr = UDATA.cast(address); | ||
| UDATA heapBase = UDATA.cast(extensions.cardTable()._heapBase()); | ||
| UDATA heapTop = UDATA.cast(extensions.cardTable()._heapAlloc()); |
There was a problem hiding this comment.
we should not be fetching base/alloc from card table. probalby those fileds exist in ext.heap
| dataAddr = null; | ||
| } | ||
| out.format(" U_64 DataAddr = %s, %n", (dataAddr == null)? "NULL" : dataAddr.getHexAddress()); | ||
| } |
There was a problem hiding this comment.
move after the size printing
There was a problem hiding this comment.
No space before %n; missing space before ?.
There was a problem hiding this comment.
This has not been addressed.
d82fdea to
47a96f2
Compare
dce38d6 to
441b94e
Compare
|
Hi @keithc-ca Could you please review the changes, Thanks |
| dataAddr = null; | ||
| } | ||
| out.format(" U_64 DataAddr = %s, %n", (dataAddr == null)? "NULL" : dataAddr.getHexAddress()); | ||
| } |
There was a problem hiding this comment.
No space before %n; missing space before ?.
441b94e to
6205144
Compare
keithc-ca
left a comment
There was a problem hiding this comment.
Several of my previous review comments have not been addressed: please correct that.
| dataAddr = null; | ||
| } | ||
| out.format(" U_64 DataAddr = %s, %n", (dataAddr == null)? "NULL" : dataAddr.getHexAddress()); | ||
| } |
There was a problem hiding this comment.
This has not been addressed.
|
Please update the commit message and the description here to use the full names of the relevant options (e.g. refer to |
35025a6 to
b8a96b4
Compare
keithc-ca
left a comment
There was a problem hiding this comment.
Please also update the commit message:
- correct the spelling of "dependence"
- start sentences with a capital
- insert a space before parenthetical comments
- avoid lines longer than 72 characters
|
Functionally, looks good. I'll approve, although expect that a couple of comments from @keithc-ca (like updating PR comment) to be addressed. |
This change would not have any dependence on off-heap runtime changes, and should handle old core file (before any off-heap changes introduced) , intermediate core file (-XXgc:disableIndexableDualHeaderShape) and new core file (-XXgc:enableVirtualLargeObjectHeap or -XXgc:disableVirtualLargeObjectHeap) smoothly. - Use gcExtensions.isVirtualLargeObjectHeapEnabled for identifying if off heap is enabled or not. - Verify the DataAddr via hasCorrectDataAddrPointer() if isVirtualLargeObjectHeapEnabled. - Use javaVM.isIndexableDataAddrPresent for identifying if there is extra DataAddr field in the header of IndexableObject. - Output DataAddr after size for IndexableObject if isIndexableDataAddrPresent. - Handle new structures J9IndexableObjectWithDataAddressContiguous/Discontiguous - Use arrayletObjectModel->_arrayletRangeBase/ _arrayletRangeTop to verify if the address in heap. Signed-off-by: lhu <linhu@ca.ibm.com>
b8a96b4 to
128d447
Compare
|
Jenkins test sanity,extended amac jdk21 |
This change would not have any dependence on off-heap runtime changes,
and should handle old core file (before any off-heap changes introduced)
, intermediate core file (-XXgc:disableIndexableDualHeaderShape) and new
core file (-XXgc:enableVirtualLargeObjectHeap or
-XXgc:disableVirtualLargeObjectHeap) smoothly.
if off heap is enabled or not.
isVirtualLargeObjectHeapEnabled.
extra DataAddr field in the header of IndexableObject.
isIndexableDataAddrPresent.
J9IndexableObjectWithDataAddressContiguous/Discontiguous
_arrayletRangeTop to verify if the address in heap.
Signed-off-by: lhu linhu@ca.ibm.com