RFR: 8144964: JVMCI compilations need to be disabled until the module system is initialized
Vladimir Kozlov
vladimir.kozlov at oracle.com
Fri Apr 1 00:36:01 UTC 2016
Looks good.
Thanks,
Vladimir
On 3/31/16 5:22 PM, Christian Thalinger wrote:
> Vladimir pointed out a bug. Of course it should be:
>
> + bool must_load;
> +#if INCLUDE_JVMCI
> + if (EnableJVMCI) {
> + // If JVMCI is enabled we require its classes to be found.
> + must_load = (init_opt < SystemDictionary::Opt) || (init_opt == SystemDictionary::Jvmci);
> + } else
> +#endif
> + {
> + must_load = (init_opt < SystemDictionary::Opt);
> + }
>
>> On Mar 31, 2016, at 1:08 PM, Christian Thalinger <christian.thalinger at oracle.com
>> <mailto:christian.thalinger at oracle.com>> wrote:
>>
>> I found a problem when graal.jar is appended to the boot class path. Somehow (and I don’t know why, yet) in that case
>> jdk.vm.ci classes are not found when trying to preload them and the VM crashes. We need to make sure the jdk.vm.ci
>> classes are preloaded if the JVMCI is enabled.
>>
>> diff -r 1b1fb02718ef src/share/vm/classfile/systemDictionary.cpp
>> --- a/src/share/vm/classfile/systemDictionary.cppThu Mar 31 09:16:49 2016 -0700
>> +++ b/src/share/vm/classfile/systemDictionary.cppThu Mar 31 13:04:35 2016 -1000
>> @@ -2063,7 +2063,18 @@ bool SystemDictionary::initialize_wk_kla
>> int sid = (info >> CEIL_LG_OPTION_LIMIT);
>> Symbol* symbol = vmSymbols::symbol_at((vmSymbols::SID)sid);
>> InstanceKlass** klassp = &_well_known_klasses[id];
>> - bool must_load = (init_opt < SystemDictionary::Opt);
>> +
>> + bool must_load;
>> +#if INCLUDE_JVMCI
>> + if (EnableJVMCI) {
>> + // If JVMCI is enabled we require its classes to be found.
>> + must_load = (init_opt <= SystemDictionary::Jvmci);
>> + } else
>> +#endif
>> + {
>> + must_load = (init_opt < SystemDictionary::Opt);
>> + }
>> +
>> if ((*klassp) == NULL) {
>> Klass* k;
>> if (must_load) {
>> diff -r 1b1fb02718ef src/share/vm/classfile/systemDictionary.hpp
>> --- a/src/share/vm/classfile/systemDictionary.hppThu Mar 31 09:16:49 2016 -0700
>> +++ b/src/share/vm/classfile/systemDictionary.hppThu Mar 31 13:04:35 2016 -1000
>> @@ -241,7 +241,7 @@ class SystemDictionary : AllStatic {
>>
>> Opt, // preload tried; NULL if not present
>> #if INCLUDE_JVMCI
>> - Jvmci, // preload tried; error if not present, use only with JVMCI
>> + Jvmci, // preload tried; error if not present if JVMCI enabled
>> #endif
>> OPTION_LIMIT,
>> CEIL_LG_OPTION_LIMIT = 2 // OPTION_LIMIT <= (1<<CEIL_LG_OPTION_LIMIT)
>>
>>
>>> On Mar 31, 2016, at 11:10 AM, Christian Thalinger <christian.thalinger at oracle.com
>>> <mailto:christian.thalinger at oracle.com>> wrote:
>>>
>>> Thanks, Vladimir.
>>>
>>>> On Mar 30, 2016, at 7:09 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com <mailto:vladimir.kozlov at oracle.com>> wrote:
>>>>
>>>> Looks fine.
>>>>
>>>> Thanks,
>>>> Vladimir
>>>>
>>>> On 3/30/16 5:01 PM, Christian Thalinger wrote:
>>>>> https://bugs.openjdk.java.net/browse/JDK-8144964
>>>>> http://cr.openjdk.java.net/~twisti/8144964/webrev.01/
>>>>>
>>>>> JVMCI compilations need to be disabled until the module system is initialized. Basically, only allow tier 1-3
>>>>> compilations until it's up.
>>>>>
>>>
>>
>
More information about the hotspot-compiler-dev
mailing list