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 12:36:05 UTC 2020


On Thu, 19 Nov 2020 10:23:18 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> Joakim Nordström has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Fixed whitespaces.
>>  - Added ParallelInitLogger with alignment logging
>
> src/hotspot/share/gc/parallel/parallelInitLogger.cpp line 38:
> 
>> 36:                      byte_size_in_exact_unit(GenAlignment), exact_unit_for_byte_size(GenAlignment),
>> 37:                      byte_size_in_exact_unit(HeapAlignment), exact_unit_for_byte_size(HeapAlignment)
>> 38:                      );
> 
> The indentation here got a bit of now. I also took a look at the current output and we do not use '=' anywhere else so I suggest going with something like this:
> Suggestion:
> 
>   log_info_p(gc, init)("Alignments:"
>                        " Space " SIZE_FORMAT "%s,"
>                        " Generation " SIZE_FORMAT "%s,"
>                        " Heap " SIZE_FORMAT "%s",
>                        byte_size_in_exact_unit(SpaceAlignment), exact_unit_for_byte_size(SpaceAlignment),
>                        byte_size_in_exact_unit(GenAlignment), exact_unit_for_byte_size(GenAlignment),
>                        byte_size_in_exact_unit(HeapAlignment), exact_unit_for_byte_size(HeapAlignment));
> This would generate output like this:
> [0.811s][info][gc,init] Compressed Oops: Enabled (Zero based)                                                                                                                                                                                                                                                        
> [0.811s][info][gc,init] Alignments: Space 512K, Generation 512K, Heap 2M                                                                                                                                                                                                                                             
> [0.811s][info][gc,init] Heap Min Capacity: 8M                                                                                                                                                                                                                                                                        
> [0.811s][info][gc,init] Heap Initial Capacity: 1002M                                                                                                                                                                                                                                                                 
> [0.811s][info][gc,init] Heap Max Capacity: 16012M                                                                                                                                                                                                                                                                    
> [0.811s][info][gc,init] Pre-touch: Disabled

Yes, looks much better! I just took the format from the original pagesize output, but this looks better.

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

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



More information about the hotspot-gc-dev mailing list