RFR: 8264395: WB_EnqueueInitializerForCompilation fails with "method holder must be initialized" when called for uninitialized class [v2]

Rahul Raghavan rraghavan at openjdk.java.net
Thu Apr 29 10:34:15 UTC 2021


On Wed, 28 Apr 2021 13:16:34 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Rahul Raghavan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8264395: WB_EnqueueInitializerForCompilation fails with "method holder must be initialized" when called for uninitialized class
>
> test/hotspot/jtreg/compiler/whitebox/TestEnqueueInitializerForCompilation.java line 27:
> 
>> 25:  * @test
>> 26:  * @bug 8264395
>> 27:  * @summary testing of WB::enqueueInitializerForCompilation()
> 
> Maybe change the summary to something explaining that we are testing compilation of the class initializer of a class that is not initialized yet.

Done.

> test/hotspot/jtreg/compiler/whitebox/TestEnqueueInitializerForCompilation.java line 28:
> 
>> 26:  * @bug 8264395
>> 27:  * @summary testing of WB::enqueueInitializerForCompilation()
>> 28:  * @library /test/lib /
> 
> `/test/lib` is not required, right?

Changed to @library /test/lib (required for sun.hotspot.WhiteBox)

> test/hotspot/jtreg/compiler/whitebox/TestEnqueueInitializerForCompilation.java line 31:
> 
>> 29:  * @build sun.hotspot.WhiteBox
>> 30:  * @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox
>> 31:  * @run main/othervm/timeout=300 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
> 
> Why do you need a non-default timeout?

Removed.

> test/hotspot/jtreg/compiler/whitebox/TestEnqueueInitializerForCompilation.java line 42:
> 
>> 40: 
>> 41:     public static void main(String[] args) {
>> 42:         WhiteBox.getWhiteBox().enqueueInitializerForCompilation(LongWrapper.class, 4);
> 
> What if compilation level 4 (= C2) is not available?

Found unavailable/bad comp levels handled in WhiteBox::compile_method() or later in CompileBroker::compile_method.

> test/hotspot/jtreg/compiler/whitebox/TestEnqueueInitializerForCompilation.java line 53:
> 
>> 51:         }
>> 52: 
>> 53:         static LongWrapper wrap(long val) {
> 
> `wrap` is unused. Are fields required?

Removed. Used smallest possible class.

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

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


More information about the hotspot-compiler-dev mailing list