[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    Re: (10) RFR: 8157709: NMT should use size_t version of Atomic::add
From:       David Holmes <david.holmes () oracle ! com>
Date:       2017-02-13 23:56:56
Message-ID: da62a774-e4df-7813-ccd6-14205668d56c () oracle ! com
[Download RAW message or body]

Thanks Serguei!

David

On 14/02/2017 6:50 AM, serguei.spitsyn@oracle.com wrote:
> Hi David,
>
> This looks good to me.
>
>
> Thanks,
> Serguei
>
>
> On 2/12/17 17:46, David Holmes wrote:
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8157709
>>
>> webrev: http://cr.openjdk.java.net/~dholmes/8157709/webrev/
>>
>> NMT typdef'd MemoryCounterType to jlong on 64-bit and jint on 32-bit.
>> Really it should just be size_t and in fact the typedef is not needed
>> at all as it was only used for casting size_t's when invoking
>> Atomic::add. So MemoryCounterType is removed. Only glitch was that
>> using negation of an unsigned variable triggered a warning on Windows
>> which I have had to silence with a pragma. (As unknown pragma's must
>> be ignored I have not ifdef'd the pragma - doing so would also be a
>> problem as warning suppression only operates on the next line, so then
>> I'd have to push and pop the warning which would be really, really ugly.)
>>
>>
>> Also as a result of this change there is no longer any use of the
>> buggy Atomic::add(jlong) and as discussed here:
>>
>> http://mail.openjdk.java.net/pipermail/hotspot-dev/2016-February/021620.html
>>
>>
>> it is simply removed.
>>
>> Testing: JPRT
>>          runtime/NMT
>>
>> Thanks,
>> David
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic