Skip to content

Commit

Permalink
[profiler][feat] Add assertion for obj's Numa Node search correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
orionpapadakis authored and zakkak committed Nov 29, 2019
1 parent 6a9c9d4 commit de217bc
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -313,12 +313,16 @@ public void findObjectNumaNode() {
int maxPageIndex = heapPages.pagesCurrentIndex;
for (int i = 0; i < newObjects.currentIndex; i++) {
objectAddress = newObjects.readAddr(i);
// safe for heap up to 8TB
pageIndex = (int) (objectAddress - firstPageAddress) / pageSize;
if (pageIndex > maxPageIndex) {
Log.println("Heap Ranges Overflow");
MaxineVM.exit(1);
}
int node = heapPages.readNumaNode(pageIndex);
// compare the calculated object numa node with the libnuma system
// call returned value for validation (note: increased overhead)
assert node == NUMALib.numaNodeOfAddress(newObjects.readAddr(i));
newObjects.writeNode(i, node);

if (VirtualPagesBuffer.debug) {
Expand Down

0 comments on commit de217bc

Please sign in to comment.