Update: Request for reviews (M): 7017124: Fix some VM stats to avoid 32-bit overflow

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Feb 3 19:39:12 PST 2011

Update after reviews.
Renamed method and moved it outside Atomic class since it is not atomic.


Fixed 7017124: Fix some VM stats to avoid 32-bit 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 method inc_stat_counter() to increment long
statistic values and use atomic long load and store.

Fixed several output formats to use 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.

I fixed only statistic which was interesting to me.

More information about the hotspot-dev mailing list