RFR (S): 8008314 - Unimplemented() Atomic::load breaks the applications
Jesper Wilhelmsson
jesper.wilhelmsson at oracle.com
Mon Feb 18 22:25:43 PST 2013
Hi,
Please review the following change:
Webrev: http://cr.openjdk.java.net/~jwilhelm/8008314/
Bug: https://jbs.oracle.com/bugs/browse/JDK-8008314
The use of atomic::add(jlong,jlong*) breaks everything on ARM since it uses
atomic::load(jlong) which isn't implemented.
The add was used to update a counter in rotating log file handling, but it turns
out that the counter that was updated doesn't need to be a jlong.
The counter is used to indicate that it is time to do a log file rotation and by
adding a saftey catch for overflow, we can use an uintx for the counter.
In practice this means that the upper "limit" for the log file size becomes
UINX_MAX-1 (used to be UINT_MAX) since I change from < to <= in the comparison
to the limit, but since this is not a hard limit the difference will only be
noticeable when someone has written UINT_MAX characters to the log file and the
next write will end up in the next log file part instead of in the same (which
one could argue is a more correct behavior).
Sine I changed all places where the counter was used I also fixed a typo in its
name.
Thanks,
/Jesper
More information about the hotspot-dev
mailing list