RFR: 8261230: GC tracing of page sizes are wrong in a few places [v2]

Stefan Johansson sjohanss at openjdk.java.net
Thu Feb 11 18:30:38 UTC 2021


On Thu, 11 Feb 2021 17:31:57 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Looks good. `os::trace_page_sizes_for_requested_size` is not easy to understand, especially with the alignment vs preferred_page_size semantic. Not sure what alignment has to do with preferred page size.

Thanks. I agree that it is not that straight forward but I think the intention here is to pass in both page size and alignment to make it easier to understand why the actual size might be large than the requested size. For example in cases like this:
[debug][gc,heap,coops] Reserve regular memory without large pages
[info ][pagesize     ] Next Bitmap: req_size=32000K base=0x00007fa4ef400000 page_size=4K alignment=2M size=32M
 

> We could prevent these kind of errors and make the code more readable by introducing a page size enum. We only have a handful of valid values anyway.

Yes, there is certainly room for improvement in this area =)

-------------

PR: https://git.openjdk.java.net/jdk/pull/2486



More information about the hotspot-gc-dev mailing list