RFR: 8146990: Convert CollectorPolicy to use log_warning instead of warning
Bengt Rutisson
bengt.rutisson at oracle.com
Thu Jan 14 07:41:02 UTC 2016
Hi Erik,
On 2016-01-13 17:18, Erik Helin wrote:
> On 2016-01-13, Stefan Johansson wrote:
>> Hi Erik,
>>
>> Thanks for doing this improvement.
>>
>> On 2016-01-13 15:24, Erik Helin wrote:
>>> Hi all,
>>>
>>> this patchs updates CollectorPolicy to use log_warning(gc, ergo) instead of
>>> warning (as part of updating the GC code to use unified logging).
>>>
>>> Enhancement:
>>> https://bugs.openjdk.java.net/browse/JDK-8146990
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~ehelin/8146990/00/webrev/
>> src/share/vm/gc/shared/collectorPolicy.cpp:
>> 700 log_warning(gc, ergo)("GenCollectorPolicy::mem_allocate_work
>> retries %d times \n\t"
>> 701 " size=" SIZE_FORMAT " %s", try_count,
>> size, is_tlab ? "(TLAB)" : "");
>>
>> 873 log_warning(gc, ergo)("satisfy_failed_metadata_allocation()
>> retries %d times \n\t"
>> 874 " size=" SIZE_FORMAT, loop_count,
>> word_size);
>>
>> After UL we avoid having multi-line logging statements. So I suggest you
>> either re-format these to only use a single line each.
> Nice catch, I missed the \t and the \n characters. New patches are
> available at:
> - full: http://cr.openjdk.java.net/~ehelin/8146990/01/
> - inc: http://cr.openjdk.java.net/~ehelin/8146990/01/inc/
Do you really want to change the output format of this line? You changed
from
873 warning("satisfy_failed_metadata_allocation() retries %d
times \n\t"
874 " size=" SIZE_FORMAT, loop_count, word_size);
to
873 log_warning(gc, ergo)("satisfy_failed_metadata_allocation()
retries %d times,"
874 " size=" SIZE_FORMAT, loop_count,
word_size);
That will change from a two line message to a single line. A more
correct translation if you just want to move from the old logging to the
new would be:
873 log_warning(gc, ergo)("satisfy_failed_metadata_allocation()
retries %d times,", loop_count);
874 log_warning(gc, ergo)("\t size=" SIZE_FORMAT, word_size);
I'm fine with changing to one line. Just asking if this is intentional.
Bengt
>
> Thanks,
> Erik
>
>> ---
>>
>> Otherwise the change looks good.
>>
>> Thanks,
>> Stefan
>>
>>> Testing:
>>> - JPRT
>>>
>>> Thanks,
>>> Erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20160114/db40f517/attachment.htm>
More information about the hotspot-gc-dev
mailing list