RFR: 8184286: print_tracing_info() does not use Unified Logging for output

Erik Helin erik.helin at oracle.com
Tue Sep 5 13:49:55 UTC 2017

Hi Stefan,

thanks for cleaning this up!

On 09/01/2017 02:57 PM, Stefan Johansson wrote:
> Hi,
> Please review this RFE to convert two more flags to use UL:
> https://bugs.openjdk.java.net/browse/JDK-8184286
> Webrev:
> http://cr.openjdk.java.net/~sjohanss/8184286/hotspot.00/

For GenCollectedHeap::print_tracing_info(), I would prefer it to be 
renamed to GenCollectedHeap::log_tracing_info(), since the method now 
logs instead of prints :)

I would have written GenCollectedHeap::print_tracing_info() like:

   LogTarget(Debug, gc, heap, exit) lt; 

   if (lt.is_enabled()) {
     LogStream ls(lt); 




and then remove void Generation::print_summary_info(), only keep 
Generation::print_summary_info_on(outputStream* st) (but update the log 
message like you did).

But, if you prefer the current approach, that is fine by me as well.


> Summary:
> Converting two logging/tracing flags that had not been yet been changed 
> to use unified logging. TraceYoungGenTime and TraceOldGenTime prints 
> information at VM exit and the same information will now be available 
> under tag-set "gc, heap, exit" on debug level.
> Testing:
> * Manually verified that same information as before is available.
> * JPRT for sanity
> Thanks,
> Stefan

More information about the hotspot-gc-dev mailing list