RFR: 8262049: [TESTBUG] Fix TestReferenceRefersTo.java for Shenandoah IU mode [v3]

Roman Kennke rkennke at openjdk.java.net
Mon Feb 22 16:26:03 UTC 2021


On Mon, 22 Feb 2021 15:25:46 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix compilation failures after renames
>
> test/hotspot/jtreg/gc/TestReferenceRefersToDuringConcMark.java line 27:
> 
>> 25: 
>> 26: /* @test
>> 27:  * @requires vm.gc != "Epsilon"
> 
> I think this test "works" for Epsilon just as well as it does for Serial or Parallel or any other GC that doesn't support concurrent breakpoints, and either all should be excluded or none.

Right. I excluded none.

> test/hotspot/jtreg/gc/TestReferenceRefersToDuringConcMark.java line 28:
> 
>> 26: /* @test
>> 27:  * @requires vm.gc != "Epsilon"
>> 28:  * @requires vm.gc != "Shenandoah"
> 
> I think this test works for Shenandoah so long as it's not in IU mode.  Is that possible to exclude with another `@requires` constraint?

How would I do that? IU mode can only be distinguished by VM flag.

> test/hotspot/jtreg/gc/TestReferenceRefersToDuringConcMark.java line 145:
> 
>> 143: 
>> 144:         progress("acquire control of concurrent cycles");
>> 145:         WB.concurrentGCAcquireControl();
> 
> I think this test could be made a lot smaller and more obvious if it was explicitly just testing the keep-alive behavior of Reference.get for most concurrent collectors, rather than being a trimmed down copy of the earlier test.

Right. I trimmed it some more. I think it's cleaner now.

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

PR: https://git.openjdk.java.net/jdk/pull/2653



More information about the hotspot-gc-dev mailing list