Skip to content
Permalink
Browse files
8261029: Code heap page sizes not traced correctly using os::trace_pa…
…ge_sizes

Reviewed-by: kvn, stuefe, thartmann
  • Loading branch information
kstefanj committed Feb 11, 2021
1 parent 0a89987 commit eef86a80f895f08b97ca4b8e47d793082f0ede9d
Showing with 3 additions and 8 deletions.
  1. +3 −8 src/hotspot/share/memory/heap.cpp
@@ -207,17 +207,12 @@ bool CodeHeap::reserve(ReservedSpace rs, size_t committed_size, size_t segment_s
_log2_segment_size = exact_log2(segment_size);

// Reserve and initialize space for _memory.
size_t page_size = os::vm_page_size();
if (os::can_execute_large_page_memory()) {
const size_t min_pages = 8;
page_size = MIN2(os::page_size_for_region_aligned(committed_size, min_pages),
os::page_size_for_region_aligned(rs.size(), min_pages));
}

const size_t page_size = ReservedSpace::actual_reserved_page_size(rs);
const size_t granularity = os::vm_allocation_granularity();
const size_t c_size = align_up(committed_size, page_size);
assert(c_size <= rs.size(), "alignment made committed size to large");

os::trace_page_sizes(_name, committed_size, rs.size(), page_size,
os::trace_page_sizes(_name, c_size, rs.size(), page_size,
rs.base(), rs.size());
if (!_memory.initialize(rs, c_size)) {
return false;

0 comments on commit eef86a8

Please sign in to comment.