-Xcomp test time regressions?

Aleksey Shipilev shade at redhat.com
Mon Jun 28 14:07:41 UTC 2021


On 6/28/21 3:49 PM, Aleksey Shipilev wrote:
> On 6/28/21 3:18 PM, David Holmes wrote:
>> Did we use to handle the TEST_VM_OPTS differently, such that it didn't
>> apply to the javac part?
> 
> Looking at test history, I think -Xcomp always applied to javac, but now -Xcomp is slower itself,
> and it shows. See below.
> 
>>> Before I go and bisect this more thoroughly, is this an already known
>>> thing?
> 
> Bisected.
> 
> Yes, it is a known thing:
>     https://bugs.openjdk.java.net/browse/JDK-8264903
> 
> So maybe we should attack it from a different angle: somehow ask jtreg to invoke javac without
> additional JVM options, so we don't spend significant time -Xcomp-ing javac itself. I tried to add
> "@build <testname>" to the exemplar test, but it is still compiled with -Xcomp. Either way, even if
> that worked, it would be awkward to add to every test out there.
> 
> jtreg docs say that -vmoption is used when compiling and running classes. I cannot find the option
> that could provide different VM options to compiling and running classes. Adding one might make sense?

Oh wait, there is -javaoption: and -javacoption:, hm. First option is accessible via JAVA_OPTIONS.

So these two things behave differently:

$ make run-test TEST=gc/shenandoah/mxbeans/TestPauseNotifications.java TEST_VM_OPTS="-Xcomp"

real	5m37.320s
user	18m17.810s
sys	0m14.241s

$ make run-test TEST=gc/shenandoah/mxbeans/TestPauseNotifications.java TEST_OPTS="JAVA_OPTIONS=-Xcomp"

real	2m16.399s
user	9m3.895s
sys	0m10.085s

I have checked that -Xcomp is indeed passed to the test in the latter case, and it compiles 
everything there. I guess it is time to revise my test scripts to always do the latter to save cycles.

-- 
Thanks,
-Aleksey



More information about the jdk-dev mailing list