On Tue, 22 Feb 2022 21:22:50 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> This test has 4 test cases/modes: two core files test cases and two process. >> Each runs with and w/o `-Xcomp`. The `-Xcomp` test cases are not suppose to >> run when `-XX:+DeoptimizeALot` is used, because the test does some checks >> that assume certain methods will be compiled. This is handled by adding the >> following to the test case: >> >> ` * @requires vm.opt.DeoptimizeALot != true` >> >> When this was first added, only the process test cases existed. Later on the >> core tests cases were added, and the `@requires` was copied improperly. It >> ended up with `#no-xcomp-process` rather than `#xcomp-core`, which allows >> the `#xcomp-core` test case to run even when `-XX:+DeoptimizeALot` is being >> used. > > test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java line 49: > >> 47: * @bug 8193124 >> 48: * @summary Test the clhsdb 'findpc' command with Xcomp on core file >> 49: * @requires vm.compMode != "Xcomp" > > The summary says "with Xcomp" but the requires says "!= Xcomp" ??? Xcomp is in reference to how the debuggee is launched, and that is controlled by the test. See next comment for more. > test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java line 61: > >> 59: * @bug 8193124 >> 60: * @summary Test the clhsdb 'findpc' command w/o Xcomp on live process >> 61: * @requires vm.hasSA > > Summary says w/o xcomp but no requires clause to reject Xcomp mode I think that is related to why xcomp-process and xcomp-core are not in agreement. Probably also a bug introduced when adding the two core tests (just like the DeoptimizeALot check was done wrong). As a reference, here's what it looked like before adding the two core tests: * @requires vm.hasSA * @requires vm.compiler1.enabled * @requires vm.opt.DeoptimizeALot != true * @run main/othervm/timeout=480 ClhsdbFindPC true * @requires vm.compMode != "Xcomp" * @requires vm.hasSA * @requires vm.compiler1.enabled * @run main/othervm/timeout=480 ClhsdbFindPC false The first test is running the debuggee with -Xcomp. The test itself can be run with or without -Xcomp. The second runs the debuggee without -Xcomp. In this case the test is not allowed to be run with -Xcomp, because it would be passed to the debuggee (although with some work the test could have stripped it). I believe Leonid added this restriction to avoid unnecessarily testing the debuggee in -Xcomp mode twice. To be it consistent it looks like I need to move the `@requires vm.compMode != "Xcomp"` from `id=xcomp-core` to `no-xcomp-process`. The other choice is to just remove this restriction. I wasn't a fan of it when it went in initially. ------------- PR: https://git.openjdk.java.net/jdk/pull/7542