JDK-8261029 : Code heap page sizes not traced correctly using os::trace_page_sizes
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,16,17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-02-03
  • Updated: 2021-02-23
  • Resolved: 2021-02-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b10Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
The tracing of code heap page sizes is not always correct since the traced page sizes is "calculated" using both min and max size of the traced heap while the reservation only cares about the total size given by ReservedCodeCacheSize.

The page sized used when creating the ReservedCodeSpace in CodeCache::reserve_heap_memory() will be the page size used by all heaps added into that reservation. So rather then re-calculating the page size in CodeHeap::reserve(), the passed in reserved space should be looked at. Currently this is a bit problematic since a ReservedSpace doesn't hold the page size, but we can check if it is special or not and that way know if it is using large pages or not. 
Comments
Changeset: eef86a80 Author: Stefan Johansson <sjohanss@openjdk.org> Date: 2021-02-11 13:10:37 +0000 URL: https://git.openjdk.java.net/jdk/commit/eef86a80
11-02-2021

ILW = Log information about code heap page sizes is incorrect, with pagesize logging enabled, disable segmented code cache = MLH = P4
05-02-2021