RFR: 8152491: Convert TracePageSizes to use UL

Stefan Johansson stefan.johansson at oracle.com
Fri Apr 8 08:57:34 UTC 2016


Hi StefanK,

On 2016-04-06 20:16, Stefan Karlsson wrote:
> Hi all,
>
> Please review to convert TracePageSizes to use UL.
>
> http://cr.openjdk.java.net/~stefank/8152491/webrev.01
> https://bugs.openjdk.java.net/browse/JDK-8152491
>
> TracePageSizes used to be a develop flag, but I've decided to create a 
> UL tag accessible from release builds. We've recently needed to debug 
> some large pages code and wanted this information in release builds.
>
Looks good in general and I like that we make it available in product 
mode. Just a few comments.

os.cpp: 1534 void os::trace_page_sizes_for_requested_size(const char* str,
1535 const size_t requested_size, ...
1541 log_info(pagesizes)("%s:"
1542 " req_size=" SIZE_FORMAT "%s"
1543 " base=" PTR_FORMAT
...
1547 str,
1548 trace_page_size_params(size),
1549 p2i(base),
On line 1548 we should use requested_size instead of size.---

genCollectedHeap.cpp:
170
171   os::trace_page_sizes("Heap", collector_policy()->min_heap_byte_size(),
172                        total_reserved,
173                        alignment,
174                        heap_rs->base(),
175                        heap_rs->size());

Move min_heap_byte_size() to its own line.
---

I also think that it would be better to use 'pagesize' instead of 
'pagesizes' as the tag, even though the old flag said pagesizes. But 
there are a lot of other flags that also have an ending s, exceptions 
for example, so I'm not sure how we should handle it. It would be good 
to make the tags feel "unified".

Thanks,
Stefan

> Changes in the patch:
>
> 1) Replaced TracePageSizes with the 'pagesizes' UL tag
> 2) Cleaned up the memory region description strings
> 3) Used B/K/M/G suffixes when the size is exactly divisible by those
> 4) Removed trace_gen_sizes, since the output was too obscure to be 
> that helpful
> 5) Added tracing for Serial and CMS
> 6) Fixed a jtreg test that verified the output from TracePageSizes
>
> Example output from 'java -Xlog:pagesizes -Xmx512m -XX:+UseLargePages 
> -version':
>
> [0.018s][info][pagesizes] CodeHeap 'non-nmethods':  min=2496K max=8M 
> base=0x00007fd735000000 page_size=4K size=8M
> [0.018s][info][pagesizes] CodeHeap 'profiled nmethods':  min=2496K 
> max=116M base=0x00007fd735800000 page_size=4K size=116M
> [0.018s][info][pagesizes] CodeHeap 'non-profiled nmethods': min=2496K 
> max=116M base=0x00007fd73cc00000 page_size=4K size=116M
> [0.056s][info][pagesizes] Heap:  min=8M max=512M 
> base=0x00000000e0000000 page_size=2M size=512M
> [0.056s][info][pagesizes] Block Offset Table: req_size=1M 
> base=0x00007fd6d5fe1000 page_size=4K alignment=4K size=1M
> [0.056s][info][pagesizes] Card Table: req_size=1M 
> base=0x00007fd6d5de1000 page_size=4K alignment=4K size=1M
> [0.056s][info][pagesizes] Card Counts Table: req_size=1M 
> base=0x00007fd6d5ce1000 page_size=4K alignment=4K size=1M
> [0.056s][info][pagesizes] Prev Bitmap: req_size=8M 
> base=0x00007fd6d5400000 page_size=2M alignment=2M size=8M
> [0.056s][info][pagesizes] Next Bitmap: req_size=8M 
> base=0x00007fd6d4c00000 page_size=2M alignment=2M size=8M
>
> The patch uses the LogStreamCHeap from the following patch that is out 
> for review:
> http://mail.openjdk.java.net/pipermail/hotspot-dev/2016-April/022477.html
>
> Tested with JPRT and new internal VM test for the suffixes.
>
> Thanks,
> StefanK

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20160408/7fed4825/attachment.htm>


More information about the hotspot-gc-dev mailing list