hotspot/src/share/vm/memory/universe.cpp
changeset 950 6112b627bb36
parent 670 ddf3e9583f2f
child 1388 3677f5f3d66b
equal deleted inserted replaced
823:9a5271881bc0 950:6112b627bb36
   365 
   365 
   366   // Compute is_jdk version flags.
   366   // Compute is_jdk version flags.
   367   // Only 1.3 or later has the java.lang.Shutdown class.
   367   // Only 1.3 or later has the java.lang.Shutdown class.
   368   // Only 1.4 or later has the java.lang.CharSequence interface.
   368   // Only 1.4 or later has the java.lang.CharSequence interface.
   369   // Only 1.5 or later has the java.lang.management.MemoryUsage class.
   369   // Only 1.5 or later has the java.lang.management.MemoryUsage class.
   370   if (JDK_Version::is_pre_jdk16_version()) {
   370   if (JDK_Version::is_partially_initialized()) {
   371     klassOop k = SystemDictionary::resolve_or_null(vmSymbolHandles::java_lang_management_MemoryUsage(), THREAD);
   371     uint8_t jdk_version;
       
   372     klassOop k = SystemDictionary::resolve_or_null(
       
   373         vmSymbolHandles::java_lang_management_MemoryUsage(), THREAD);
   372     CLEAR_PENDING_EXCEPTION; // ignore exceptions
   374     CLEAR_PENDING_EXCEPTION; // ignore exceptions
   373     if (k == NULL) {
   375     if (k == NULL) {
   374       k = SystemDictionary::resolve_or_null(vmSymbolHandles::java_lang_CharSequence(), THREAD);
   376       k = SystemDictionary::resolve_or_null(
       
   377           vmSymbolHandles::java_lang_CharSequence(), THREAD);
   375       CLEAR_PENDING_EXCEPTION; // ignore exceptions
   378       CLEAR_PENDING_EXCEPTION; // ignore exceptions
   376       if (k == NULL) {
   379       if (k == NULL) {
   377         k = SystemDictionary::resolve_or_null(vmSymbolHandles::java_lang_Shutdown(), THREAD);
   380         k = SystemDictionary::resolve_or_null(
       
   381             vmSymbolHandles::java_lang_Shutdown(), THREAD);
   378         CLEAR_PENDING_EXCEPTION; // ignore exceptions
   382         CLEAR_PENDING_EXCEPTION; // ignore exceptions
   379         if (k == NULL) {
   383         if (k == NULL) {
   380           JDK_Version::set_jdk12x_version();
   384           jdk_version = 2;
   381         } else {
   385         } else {
   382           JDK_Version::set_jdk13x_version();
   386           jdk_version = 3;
   383         }
   387         }
   384       } else {
   388       } else {
   385           JDK_Version::set_jdk14x_version();
   389         jdk_version = 4;
   386       }
   390       }
   387     } else {
   391     } else {
   388           JDK_Version::set_jdk15x_version();
   392       jdk_version = 5;
   389     }
   393     }
       
   394     JDK_Version::fully_initialize(jdk_version);
   390   }
   395   }
   391 
   396 
   392   #ifdef ASSERT
   397   #ifdef ASSERT
   393   if (FullGCALot) {
   398   if (FullGCALot) {
   394     // Allocate an array of dummy objects.
   399     // Allocate an array of dummy objects.