On Wed, 3 Sep 2025 01:41:15 GMT, pf0n <d...@openjdk.org> wrote:

>> test/jdk/jdk/jfr/event/gc/objectcount/TestObjectCountAfterGCEventWithShenandoah.java
>>  line 11:
>> 
>>> 9:  *           & vm.opt.ExplicitGCInvokesConcurrent != true
>>> 10:  * @library /test/lib /test/jdk
>>> 11:  * @run main/othervm -XX:+UnlockExperimentalVMOptions 
>>> -XX:-UseFastUnorderedTimeStamps -XX:+UseShenandoahGC 
>>> -XX:MarkSweepDeadRatio=0 -XX:-UseCompressedOops 
>>> -XX:-UseCompressedClassPointers -XX:+IgnoreUnrecognizedVMOptions 
>>> jdk.jfr.event.gc.objectcount.TestObjectCountAfterGCEventWithShenandoah
>> 
>> Are all of these flags necessary to run this test? Can we pare any 
>> unnecessary options?
>
> All of the collectors that test for the ObjectCountAfterGC event uses these 
> flags. I thought it would be best to keep it consistent for the Shenandoah 
> test.

Best practice is to remove flags that are no-ops, otherwise we accrue junk here.

I'd urge removal of such cruft, in particular: MarkSweepDeadRatio, 
UseCompressedOops & UseCompressedClassPointers (which you may have added for 
debugging ease), and IgnoreUnrecognizedVMOptions (which should, I think, not be 
there in any tests unless there is an explicitly stated reason to include it). 
I am not sure we even need UseFastUnorderedTimeStamps either since the test 
does not, to my knowledge, examine the order of timestamped events in the JFR 
recording. If further constraint checking is added to the tests that requires 
this, it should be added back at that time.

For the other collectors, we can consider a separate ticket to clean any 
unnecessary flags up (I suspect only MarkSweepDeadRatio may be needed for the 
cases where one is looking for a collection to necessarily move objects-- which 
I don't think these tests test for -- so even that flag appears unnecessary at 
least for these tests.)

I vote for unburdening the flag load for the new Shenandoah test at least, as 
suggested by William.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26977#discussion_r2320627227

Reply via email to