RFR: 8269032: Stringdedup tests are failing if the ergonomically select GC does not support it

Kim Barrett kbarrett at openjdk.java.net
Wed Jun 30 07:32:06 UTC 2021

On Wed, 30 Jun 2021 06:07:08 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> test/hotspot/jtreg/gc/stringdedup/TestStringDeduplicationAgeThreshold.java line 30:
>>> 28:  * @summary Test string deduplication age threshold
>>> 29:  * @bug 8029075
>>> 30:  * @requires vm.gc == "G1" | vm.gc == "Shenandoah"
>> I think this should be `@requires vm.gc.G1` and it should pass `-XX:+UseG1GC`to the test, which it appends to the list of arguments for the JVM that will be spawned.
>> Also, I think `-XX:+NeverActAsServerClassMachine` is a bit of an special case or anomaly. It's the only option that influences which GC is ergonomically selected, and I'm not sure it should even do that. Rather that trying to dance around it here, I would suggest that we no longer allow that option to influence which GC is selected.
> I think you missed the point.  I'm pretty sure the original report arose
> because of running these tests on a non-server machine.  I don't have ready
> access to such a machine, but by using that option I was able to fake things
> enough to feel confident these tests would now run on such.
> I think the main problem with -XX:+NeverActAsServerClassMachine (and the
> associated -XX:+AlwaysActAsServerClassMachine) is that they are product
> options rather than diagnostic options.  That may be because they've been
> around "forever" and nobody has taken the time to change them.

(I missed that github attached the above reply about `-XX:+NeverActAsServerClassMachine` to this unrelated conversation thread.  Sorry about that.)


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

More information about the hotspot-gc-dev mailing list