RFR: 8317228: GC: Make TestXXXHeapSizeFlags use createTestJvm [v2]

Stefan Johansson sjohanss at openjdk.org
Fri Oct 13 13:28:30 UTC 2023


On Fri, 13 Oct 2023 12:26:47 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:

>> test/jtreg-ext/requires/VMProps.java line 143:
>> 
>>> 141:         map.put("vm.flagless", this::isFlagless);
>>> 142:         map.put("jdk.foreign.linker", this::jdkForeignLinker);
>>> 143:         map.putAll(xOptFlags()); // -Xmx4g -> @requires vm.opt.x.Xmx == "4g" )
>> 
>> Does it have to be `vm.opt.x.*` or could we just add those to `vm.opt` and use for example: `vm.opt.Xmx == null`? Or do we have -X and -XX: options that collide?
>
> I know of no colliding options ATM. They could be colliding in the future (especially if we chose to parse extra options not starting with a `-X`). Also, I think it is incredibly confusing to reuse the `vm.opt` namespace that is used by vanilla JTREG by our extension code in VMProps. I would object to put both in the `vm.opt` namespace.

I agree it is a bit ugly and the point of this being an extension is good. An alternative would be to use `vm.xopt.Xmx` to even less clobber the `vm.opt` namespace, but I guess we already do by adding the `vm.opt.final` details. 

I'm ok with the current way, just wanted to raise possible alternatives.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15986#discussion_r1358264639


More information about the hotspot-gc-dev mailing list