RFR: 8243315: ParallelScavengeHeap::initialize() passes GenAlignment as page size to os::trace_page_sizes instead of actual page size [v3]

Joakim Nordström github.com+779991+jaokim at openjdk.java.net
Thu Nov 19 09:44:25 UTC 2020

> ### Description
> The logging for reserved heap space, printed the `GenAlignment` value instead of page size.
> Before:
> <pre>
> [0.369s][info][gc      ] Using Parallel
> [0.374s][info][pagesize] Heap:  min=2M max=2M base=0x00000000ffe00000 <b>page_size=512K</b> size=2M
> </pre>
> Besides changing to display page size using `os::vm_page_size()`, this fix also adds logging of `SpaceAlignment `,`GenAlignment`, and `HeapAlignment`. 
> After:
> <pre>
> [0.367s][info][pagesize] <b>Alignments:  space_align=512K gen_align=512K heap_align=2M</b>
> [0.369s][info][gc      ] Using Parallel
> [0.374s][info][pagesize] Heap:  min=2M max=2M base=0x00000000ffe00000 <b>page_size=4K</b> size=2M
> </pre>
> Please advice whether the added logging of alignments is sufficient or irrelevant. There were no signs of either alignment being logged anywhere.
> ### Testing
> - Tested manually, and logs are showing with arguments <code>-Xlog:pagesize=info -XX:+UseParallelGC</code>
> - Tested Tier1, Tier2, Tier3.

Joakim Nordström has updated the pull request incrementally with two additional commits since the last revision:

 - Fixed whitespaces.
 - Added ParallelInitLogger with alignment logging


  - all: https://git.openjdk.java.net/jdk/pull/1161/files
  - new: https://git.openjdk.java.net/jdk/pull/1161/files/6c450b63..cd9773d2

 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1161&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1161&range=01-02

  Stats: 112 lines in 5 files changed: 11 ins; 20 del; 81 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1161.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1161/head:pull/1161

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

More information about the hotspot-gc-dev mailing list