david.holmes at oracle.com
Tue May 24 23:29:49 UTC 2016
Following up ...
On 3/02/2016 4:14 PM, David Holmes wrote:
> On 3/02/2016 6:55 AM, Roman Kennke wrote:
>> I believe Atomic::add(jlong) is broken. The comment above it says:
>> // Atomically add to a location, return updated value
>> Except in atomic.cpp, add(jlong) returns the old value.
> Yes that seems broken.
>> It causes quite some headscratching on my side :-)
>> Fixing this seems easy. I am wonder if any code uses this though, maybe
>> it should be removed altogether?
> It was added here:
> for the GC log file rotation code back in 2011. But then removed here:
> because it was unnecessary and because of the missing Atomic:load(jlong)
> support it required.
> I think it can be deleted now and probably should be.
Note when I say "removed here" I meant its use was removed.
Unfortunately at some point memoryTracker.hpp also started to use it,
but we can fix that too and this will be handled under:
>> On the other hand, the implementation there uses a CAS-based loop. I
>> think an easier fix would be to cast to size_t or intptr_t and use the
>> atomic impl of that.
>> What do you think?
> Delete it.
More information about the hotspot-dev