RFR 8252249: nsk/stress/stack/stack016.java fails with "Error: TEST_BUG: trickyRecursion() must throw an error anyway!"

Igor Ignatyev igor.ignatyev at oracle.com
Wed Sep 2 14:45:25 UTC 2020


Hi Harold,

vm.compMode != "Xcomp" will exclude all combinations which has Xcomp, e.g. '-Xcomp -XX:-TieredCompilation', so it would be waste iff all other flags from Xcomp configurations are also used w/o Xcomp, which I don't think is generally true.

given vm flags from jtreg actions are appended to external flags, running this test w/ '-Xcomp -XX:-TieredCompilation' (assuming there is no @requires) will actually result in two different (and one might argue expected) runs:
 -Xcomp -XX:-TieredCompilation -Xint -Xss448K nsk.stress.stack.stack016 -eager
 -Xcomp -XX:-TieredCompilation -Xcomp -Xss448K nsk.stress.stack.stack016 -eager

thus I don't think '@requires vm.compMode' is needed here.

if you think that '-Xint' run should be excluded when one specifies -Xcomp externally, I'd suggest splitting the test into two

/*
 * @test id=Xint
 * @requires vm.compMode == null | vm.compMode == "Xint"
 * @requires (vm.opt.DeoptimizeALot != true)
 * @library /vmTestbase
 * @build nsk.share.Terminator
 * @run main/othervm/timeout=900 -Xint -Xss448K nsk.stress.stack.stack016 -eager
 */

/*
 * @test id=Xcomp
 * @requires vm.compMode == null | vm.compMode == "Xcomp"
 * @requires (vm.opt.DeoptimizeALot != true)
 * @library /vmTestbase
 * @build nsk.share.Terminator
 * @run main/othervm/timeout=900 -Xcomp -Xss448K nsk.stress.stack.stack016 -eager
 */

in this case Xint run will be run only if there is no Xint/Xmixed/Xbatch/Xcomp specified externally or Xint is specified, and similarly for Xcomp.

Thanks,
-- Igor



> On Sep 1, 2020, at 11:26 PM, David Holmes <david.holmes at oracle.com> wrote:
> 
> I would suggest that you keep the required condition
> 
> vm.compMode != "Xcomp"
> 
> to minimise the runs of this test. When executed as part of an Xcomp run both @run's will behave exactly the same way (Xcomp) - and that is the same as the second @run in a non-Xcomp run. So no point running the Xcomp version three times.



More information about the hotspot-runtime-dev mailing list