Request for reviews (M): 7017124: VM statistic use 32-bit values which may overflow
Vladimir Kozlov
vladimir.kozlov at oracle.com
Thu Feb 3 16:05:13 PST 2011
I am investigating native memory usage with EA and saw these problems.
http://cr.openjdk.java.net/~kvn/7017124/webrev
Fixed 7017124: VM statistic use 32-bit values which may overflow
During long enough time (tens minutes) on modern processors
some VM statistic 32-bit values overflow. We need to use longs.
And when a value is long we still have a problem since it is
incremented not atomically in 32-bit VM.
Added new Atomic method inc_counter() to increment long values,
it is not precise on MP (lock is not used) but it is fine.
Fixed several output formats to use VM FORMAT macros.
I have to remove v9 check assert from Atomic_move_long() since
it is called before VM_Version is initialized and C2 is built
for v9 only anyway.
Removed unused Chunk::clean_chunk_pool().
I fixed only statistic which was interesting to me.
More information about the hotspot-dev
mailing list