< prev index next >

src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp

Print this page
rev 7746 : 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
Summary: Allow partial use of large pages for auxiliary data structures in G1.
Reviewed-by:
rev 7747 : [mq]: 8058354-jon-fixes

*** 70,83 **** _executable = rs.executable(); _commit_size = commit_size; assert(_committed.size() == 0, "virtual space initialized more than once"); ! BitMap::idx_t size_in_pages = align_size_up(rs.size(), commit_size) / commit_size; ! _committed.resize(size_in_pages, /* in_resource_area */ false); if (_special) { ! _dirty.resize(size_in_pages, /* in_resource_area */ false); } return true; } --- 70,83 ---- _executable = rs.executable(); _commit_size = commit_size; assert(_committed.size() == 0, "virtual space initialized more than once"); ! BitMap::idx_t size_in_commit_pages = round_to(rs.size(), commit_size); ! _committed.resize(size_in_commit_pages, /* in_resource_area */ false); if (_special) { ! _dirty.resize(size_in_commit_pages, /* in_resource_area */ false); } return true; }
*** 138,148 **** return page_start(index + 1); } return _high_boundary; } ! void G1PageBasedVirtualSpace::commit_int(char* start, char* end) { guarantee(start >= _low_boundary && start < _high_boundary, err_msg("Start address " PTR_FORMAT" is outside of reserved space.", p2i(start))); guarantee(is_ptr_aligned(start, _commit_size), err_msg("Start address should be aligned to commit size " SIZE_FORMAT" but got " PTR_FORMAT".", _commit_size, p2i(start))); --- 138,148 ---- return page_start(index + 1); } return _high_boundary; } ! void G1PageBasedVirtualSpace::commit_internal(char* start, char* end) { guarantee(start >= _low_boundary && start < _high_boundary, err_msg("Start address " PTR_FORMAT" is outside of reserved space.", p2i(start))); guarantee(is_ptr_aligned(start, _commit_size), err_msg("Start address should be aligned to commit size " SIZE_FORMAT" but got " PTR_FORMAT".", _commit_size, p2i(start)));
*** 185,205 **** if (_dirty.get_next_one_offset(start,end) < end) { zero_filled = false; _dirty.clear_range(start, end); } } else { ! commit_int(page_start(start), page_end(end - 1)); } _committed.set_range(start, end); if (AlwaysPreTouch) { os::pretouch_memory(page_start(start), page_end(end - 1)); } return zero_filled; } ! void G1PageBasedVirtualSpace::uncommit_int(char* start, char* end) { os::uncommit_memory(start, pointer_delta(end, start, sizeof(char))); } void G1PageBasedVirtualSpace::uncommit(uintptr_t start, size_t size_in_pages) { guarantee(is_area_committed(start, size_in_pages), "checking"); --- 185,205 ---- if (_dirty.get_next_one_offset(start,end) < end) { zero_filled = false; _dirty.clear_range(start, end); } } else { ! commit_internal(page_start(start), page_end(end - 1)); } _committed.set_range(start, end); if (AlwaysPreTouch) { os::pretouch_memory(page_start(start), page_end(end - 1)); } return zero_filled; } ! void G1PageBasedVirtualSpace::uncommit_internal(char* start, char* end) { os::uncommit_memory(start, pointer_delta(end, start, sizeof(char))); } void G1PageBasedVirtualSpace::uncommit(uintptr_t start, size_t size_in_pages) { guarantee(is_area_committed(start, size_in_pages), "checking");
*** 208,218 **** if (_special) { // Mark that memory is dirty. If committed again the memory might // need to be cleared explicitly. _dirty.set_range(start, end); } else { ! uncommit_int(page_start(start), page_end(end - 1)); } _committed.clear_range(start, end); } --- 208,218 ---- if (_special) { // Mark that memory is dirty. If committed again the memory might // need to be cleared explicitly. _dirty.set_range(start, end); } else { ! uncommit_internal(page_start(start), page_end(end - 1)); } _committed.clear_range(start, end); }
< prev index next >