RFR(XS): Minor cleanup on ShenandoahHeapRegion's LiveData counter

Aleksey Shipilev shade at redhat.com
Wed Sep 28 20:04:07 UTC 2016


On 09/28/2016 07:51 PM, Aleksey Shipilev wrote:
> On 09/28/2016 03:12 PM, Zhengyu Gu wrote:
>> Shenandoah heap region's LiveData counters are set and cleared by VM
>> thread, so no atomic operations are need.
>>
>> However, getLiveData() can read the counters updated by
>> increase_live_data() method, so load_acquire() is needed.
>>
>>
>> Webrev:http://cr.openjdk.java.net/~zgu/cleanup_1/webrev/
> 
> I have a question on changes in
> src/share/vm/gc/shenandoah/shenandoahHeap.cpp -- are these the changes
> you intended to do? These seem to have nothing to do with
> ShenandoahHeapRegion::liveData.

Zhengyu explained in private note that both changes make sense: fence is
required to make the changes observable to other threads, and removed
ASSERT is actually removing the nested ASSERT.

Pushed.

-Aleksey.



More information about the shenandoah-dev mailing list