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

Stefan Johansson stefan.johansson at oracle.com
Fri Sep 8 09:56:35 UTC 2017


Thanks for reviewing Erik,

On 2017-09-05 15:49, Erik Helin wrote:
> 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);
>
>
>     _young_gen->print_summary_info(&ls);
>
>
>     _old_gen->print_summary_info(&ls);
>
>
>   }
>
> 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.
I made a mix to keep us both happy :) Using your approach to pass a 
LogStream to print_summary_info_on, but the if check uses 
log_is_enabled(Debug, gc, heap, exit)because all other check use that.

Updated webrevs:
Inc: http://cr.openjdk.java.net/~sjohanss/8184286/hotspot.00-01
Full: http://cr.openjdk.java.net/~sjohanss/8184286/hotspot.01

Thanks,
Stefan
>
> Thanks,
> Erik
>
>> 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
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20170908/9f689813/attachment.htm>


More information about the hotspot-gc-dev mailing list