RFR: 8327000: GenShen: Integrate updated Shenandoah implementation of FreeSet into GenShen [v8]

Kelvin Nilsen kdnilsen at openjdk.org
Tue Jun 18 20:23:30 UTC 2024


On Mon, 17 Jun 2024 21:28:10 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Minor refinements to test programs
>>   
>>   TestAllocIntArrays: comments to explain behavior.
>>   TestOldGrowthTriggers: reduce the number of loop iterations so this test
>>   will not time out on less powerful test platforms.
>
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 2066:
> 
>> 2064:            "Boundaries or find_first_set_bit failed: " SSIZE_FORMAT, index);
>> 2065:     ShenandoahHeapRegion* r = _heap->get_region(index);
>> 2066:     if (r->is_empty()) {
> 
> This algorithm has changed from upstream. Is that intentional?

That change came in when I merged from master.  I had assumed the change had also been applied upstream.  Is your diff compared to a "recent" upstream?

dc184f1099e0 (Kelvin Nilsen    2024-05-16 16:47:09 +0000 2037)     ShenandoahHeapRegion* r = _heap->get_region(index);
dc184f1099e0 (Kelvin Nilsen    2024-05-16 16:47:09 +0000 2038)     if (r->is_empty()) {
dc184f1099e0 (Kelvin Nilsen    2024-05-16 16:47:09 +0000 2039)       free += ShenandoahHeapRegion::region_size_bytes();
dc184f1099e0 (Kelvin Nilsen    2024-05-16 16:47:09 +0000 2040)       if (last_idx + 1 == index) {
dc184f1099e0 (Kelvin Nilsen    2024-05-16 16:47:09 +0000 2041)         empty_contig++;
f37149b1c510 (Aleksey Shipilev 2020-03-23 19:14:01 +0100 2042)       } else {
f37149b1c510 (Aleksey Shipilev 2020-03-23 19:14:01 +0100 2043)         empty_contig = 0;
f37149b1c510 (Aleksey Shipilev 2020-03-23 19:14:01 +0100 2044)       }
f37149b1c510 (Aleksey Shipilev 2020-03-23 19:14:01 +0100 2045)
f37149b1c510 (Aleksey Shipilev 2020-03-23 19:14:01 +0100 2046)       max_contig = MAX2(max_contig, empty_contig);
f37149b1c510 (Aleksey Shipilev 2020-03-23 19:14:01 +0100 2047)       last_idx = index;
f37149b1c510 (Aleksey Shipilev 2020-03-23 19:14:01 +0100 2048)     }
5f22805a50d4 (Kelvin Nilsen    2024-06-13 14:04:30 +0000 2049)     index = _partitions.find_index_of_next_available_region(Shenando\
ahFreeSetPartitionId::Mutator, index + 1);
f37149b1c510 (Aleksey Shipilev 2020-03-23 19:14:01 +0100 2050)   }

-------------

PR Review Comment: https://git.openjdk.org/shenandoah/pull/440#discussion_r1645010444


More information about the shenandoah-dev mailing list