RFR: 8220658: Improve the readability of container information in the error log

Jie Fu fujie at loongson.cn
Thu Mar 21 08:12:25 UTC 2019


Hi Bob and David,

The patch[1] has been tested with
-----------------------------------------------
make test TEST="test/jdk/jdk/modules/scenarios/container 
test/hotspot/jtreg/vmTestbase/vm/gc/containers 
test/hotspot/jtreg/runtime/containers"
-----------------------------------------------
on Linux/x86-64.

All tests passed.
==============================
Test summary
==============================
    TEST                                              TOTAL  PASS FAIL ERROR
    jtreg:test/jdk/jdk/modules/scenarios/container        1 1     0     0
    jtreg:test/hotspot/jtreg/vmTestbase/vm/gc/containers
                                                         12 12     0     0
    jtreg:test/hotspot/jtreg/runtime/containers           6 6     0     0
==============================
TEST SUCCESS

Is it OK to be pushed?
Thanks a lot.

Best regards,
Jie

[1] http://cr.openjdk.java.net/~jiefu/8220658/webrev.01/


On 2019/3/21 上午9:38, Jie Fu wrote:
> Oh, I'm very sorry for that. I am not good at English.
> Thanks David.
>
>
> On 2019/3/21 上午9:25, David Holmes wrote:
>> On 21/03/2019 11:06 am, Jie Fu wrote:
>>> Thanks Bob.
>>> I'll update the patch and run the container jtreg tests as soon as 
>>> possible.
>>
>> Bob was commenting on my original suggestion to change failed to "not 
>> supported" and indicated agreement. So I don't think there's any 
>> update to the patch needed ??
>>
>> David
>>
>>> Best regards,
>>>
>>> Jie
>>>
>>>
>>> On 2019/3/20 下午10:40, Bob Vandette wrote:
>>>> I agree with David on the failed versus not supported.
>>>>
>>>> Make sure to run the container jtreg tests since these might rely 
>>>> on the current output
>>>> formating.
>>>>
>>>> Bob.
>>>>
>>>>
>>>>> On Mar 18, 2019, at 5:43 PM, David Holmes 
>>>>> <David.Holmes at oracle.com> wrote:
>>>>>
>>>>> Hi Jie,
>>>>>
>>>>> On 14/03/2019 8:00 pm, Jie Fu wrote:
>>>>>> Hi all,
>>>>>> Bug:    https://bugs.openjdk.java.net/browse/JDK-8220658
>>>>>> Webrev: http://cr.openjdk.java.net/~jiefu/8220658/webrev.00/
>>>>> This seems a reasonable improvement, but I have a couple of 
>>>>> suggestions. To avoid so much duplication you can change this 
>>>>> structure:
>>>>>
>>>>>    if (i > 0) {
>>>>>      st->print("cpu_quota: %d\n", i);
>>>>>    } else {
>>>>>      st->print("cpu_quota: %s\n", i == OSCONTAINER_ERROR ? 
>>>>> "failed" : "no quota");
>>>>>    }
>>>>>
>>>>> to this:
>>>>>
>>>>>    st->print("cpu_quota: ");
>>>>>    if (i > 0) {
>>>>>       st->print("%d\n", i);
>>>>>    } else {
>>>>>      st->print("%s\n", i == OSCONTAINER_ERROR ? "failed" : "no 
>>>>> quota");
>>>>>    }
>>>>>
>>>>> Also I suggest replacing "failed" with "not supported".
>>>>>
>>>>> Finally one minor typo: s/"no share"/"no shares"/
>>>>>
>>>>> Thanks,
>>>>> David
>>>>> -----
>>>>>
>>>>>> In the VM's error log, the container information was dumpped as:
>>>>>> ---------------------------------
>>>>>> container (cgroup) information:
>>>>>> container_type: cgroupv1
>>>>>> cpu_cpuset_cpus: 0-11
>>>>>> cpu_memory_nodes: 0
>>>>>> active_processor_count: 12
>>>>>> cpu_quota: -1
>>>>>> cpu_period: 100000
>>>>>> cpu_shares: -1
>>>>>> memory_limit_in_bytes: -1
>>>>>> memory_and_swap_limit_in_bytes: -2
>>>>>> memory_soft_limit_in_bytes: -1
>>>>>> memory_usage_in_bytes: 11690164224
>>>>>> memory_max_usage_in_bytes: 1806413824
>>>>>> ---------------------------------
>>>>>> Items such as "memory_limit_in_bytes" and 
>>>>>> "memory_and_swap_limit_in_bytes" are difficult to understand.
>>>>>> It might be more human-readable if we could dump it like this:
>>>>>> ---------------------------------
>>>>>> container (cgroup) information:
>>>>>> container_type: cgroupv1
>>>>>> cpu_cpuset_cpus: 0-11
>>>>>> cpu_memory_nodes: 0
>>>>>> active_processor_count: 12
>>>>>> cpu_quota: no quota
>>>>>> cpu_period: 100000
>>>>>> cpu_shares: no share
>>>>>> memory_limit_in_bytes: unlimited
>>>>>> memory_and_swap_limit_in_bytes: failed
>>>>>> memory_soft_limit_in_bytes: unlimited
>>>>>> memory_usage_in_bytes: 11690164224
>>>>>> memory_max_usage_in_bytes: 1806413824
>>>>>> ---------------------------------
>>>>>> I made this patch to improve the readability of container 
>>>>>> information in the error log.
>>>>>> The change has been tested with hotspot:tier1 on Linux/x86-64.
>>>>>> Could you please review it?
>>>>>> Thanks a lot.
>>>>>> Best regards,
>>>>>> Jie
>>>
>



More information about the hotspot-dev mailing list