RFR (S): 8244815: Always log MMU information in G1

stefan.johansson at oracle.com stefan.johansson at oracle.com
Tue May 12 19:47:35 UTC 2020



On 2020-05-12 18:12, Kim Barrett wrote:
>> On May 12, 2020, at 10:39 AM, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:
>>
>> Hi,
>>
>> On 12.05.20 16:20, stefan.johansson at oracle.com wrote:
>>> Hi,
>>> On 2020-05-12 15:53, Thomas Schatzl wrote:
>>>> Hi all,
>>>>
>> [...]
>>
>>>> There is some a bit ugly code to select the correct message level. Maybe there is a better way. An alternative would be to move the message to debug level always?
>>>>
>>> I would prefer a simple else clause doing the debug logging. Any problem with that? We could also split the logging into a helper, something like:
>>> void G1MMUTrackerQueue::log_mmu(double slice_time) {
>>>    double used_time = slice_time * 1000.0;
>>>    double max_time = _max_gc_time * 1000.0;
>>>    double interval = _time_slice * 1000;
>>>    if (slice_time >= _max_gc_time) {
>>>      log_info(gc, mmu)("MMU target violated: %.1lfms (%.1lfms/%.1lfms)",
>>>                        used_time, max_time, interval);
>>>    } else {
>>>      log_debug(gc, mmu)("MMU: %.1lfms (%.1lfms/%.1lfms)",
>>>                         used_time, max_time, interval);
>>>    }
>>> }
>>> What do you think about that?
>>
>> I am okay with that and that has mostly been my initial solution, but was concerned about the code duplication.
>>
>> New webrev at http://cr.openjdk.java.net/~tschatzl/8244815/webrev.1/
>>
>> Thanks,
>>   Thomas
> 
> Looks good.

Ship it!



More information about the hotspot-gc-dev mailing list