RFR: 8280481: Duplicated static stubs in NMethod Stub Code section [v3]

Evgeny Astigeevich duke at openjdk.java.net
Fri Apr 22 13:53:16 UTC 2022


On Thu, 21 Apr 2022 16:18:52 GMT, Boris Ulasevich <bulasevich at openjdk.org> wrote:

>> Evgeny Astigeevich has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Make SharedStubToInterpRequest ResourceObj and set initial size of SharedStubToInterpRequests to 8
>
> test/hotspot/jtreg/compiler/sharedstubs/SharedStubToInterpTest.java line 33:
> 
>> 31:  * @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="i386" | os.arch=="x86" | os.arch=="aarch64"
>> 32:  *
>> 33:  * @run driver compiler.sharedstubs.SharedStubToInterpTest c2 StaticMethodTest
> 
> Is not it better to run all the VM instances from a single test?
> 
> List<String> options = java.util.Arrays.asList("-XX:-TieredCompilation", "-XX:TieredStopAtLevel=1");
> List<String> tests = java.util.Arrays.asList("StaticMethodTest", "FinalClassTest", "FinalMethodTest");
> for (String option: options) {
>     for (String test: tests) {
>         runVM(option, test);
>     }
> }

Done

> test/hotspot/jtreg/compiler/sharedstubs/SharedStubToInterpTest.java line 45:
> 
>> 43: import java.util.ArrayList;
>> 44: import java.util.Iterator;
>> 45: import java.util.ListIterator;
> 
> excessive import

Done

> test/hotspot/jtreg/compiler/sharedstubs/SharedStubToInterpTest.java line 72:
> 
>> 70:         command.add("-XX:CompileCommand=dontinline," + testClassName + "::" + "log02");
>> 71:         command.add(testClassName);
>> 72:         command.add("a");
> 
> there is no need in a/b/c params

Rewritten to remove them.

> test/hotspot/jtreg/compiler/sharedstubs/SharedStubToInterpTest.java line 121:
> 
>> 119:         int foundStaticStubs = 0;
>> 120:         while (iter.hasNext()) {
>> 121:             if (iter.next().contains("{static_stub}")) {
> 
> Should not we check "/Disassembly" method end mark to be ensure we are looking into the single method body?

No need because `PrintAssembly` is only enabled for one method.

> test/hotspot/jtreg/compiler/sharedstubs/SharedStubToInterpTest.java line 173:
> 
>> 171:         public static void main(String[] args) {
>> 172:             FinalClassTest tFC = new FinalClassTest();
>> 173:             for (int i = 1; i < 50_000; ++i) {
> 
> Can we name the constant?
> Tier4CompileThreshold is 15K, I think with -Xbatch option 20_000 should be enough.

Done

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

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


More information about the hotspot-compiler-dev mailing list