comparison src/share/vm/memory/universe.cpp @ 356:1ee8caae33af

Merge
author tonyp
date Thu, 21 Aug 2008 23:36:31 -0400
parents 37f87013dfd8 d95b224e9f17
children c96030fff130
comparison
equal deleted inserted replaced
355:0edda524b58c 356:1ee8caae33af
1 /* 1 /*
2 * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
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.