--- old/src/hotspot/share/gc/g1/heterogeneousHeapRegionManager.cpp 2019-09-21 06:25:21.025961737 -0700 +++ new/src/hotspot/share/gc/g1/heterogeneousHeapRegionManager.cpp 2019-09-21 06:25:20.661961749 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -58,7 +58,7 @@ // expand_by() is called to grow the heap. We grow into nvdimm now. // Dram regions are committed later as needed during mutator region allocation or // when young list target length is determined after gc cycle. -uint HeterogeneousHeapRegionManager::expand_by(uint num_regions, WorkGang* pretouch_workers) { +uint HeterogeneousHeapRegionManager::expand_by(uint num_regions, uint node_index, WorkGang* pretouch_workers) { uint num_regions_possible = total_regions_committed() >= max_expandable_length() ? 0 : max_expandable_length() - total_regions_committed(); uint num_expanded = expand_nvdimm(MIN2(num_regions, num_regions_possible), pretouch_workers); return num_expanded; @@ -67,7 +67,7 @@ // Expands heap starting from 'start' index. The question is should we expand from one memory (e.g. nvdimm) to another (e.g. dram). // Looking at the code, expand_at() is called for humongous allocation where 'start' is in nv-dimm. // So we only allocate regions in the same kind of memory as 'start'. -uint HeterogeneousHeapRegionManager::expand_at(uint start, uint num_regions, WorkGang* pretouch_workers) { +uint HeterogeneousHeapRegionManager::expand_at(uint start, uint num_regions, uint node_index, WorkGang* pretouch_workers) { if (num_regions == 0) { return 0; } @@ -190,7 +190,7 @@ while (so_far < num_regions && (num_last_found = find_unavailable_in_range(start, end, &chunk_start)) > 0) { uint to_commit = MIN2(num_regions - so_far, num_last_found); - make_regions_available(chunk_start, to_commit, pretouch_gang); + make_regions_available(chunk_start, to_commit, G1MemoryNodeManager::AnyNodeIndex, pretouch_gang); so_far += to_commit; start = chunk_start + to_commit + 1; } @@ -263,7 +263,7 @@ return num_regions_found; } -HeapRegion* HeterogeneousHeapRegionManager::allocate_free_region(HeapRegionType type) { +HeapRegion* HeterogeneousHeapRegionManager::allocate_free_region(HeapRegionType type, uint node_index) { // We want to prevent mutators from proceeding when we have borrowed regions from the last collection. This // will force a full collection to remedy the situation.