vm_version.cpp revision 645
/*
* Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
# include "incls/_precompiled.incl"
# include "incls/_vm_version.cpp.incl"
const char* Abstract_VM_Version::_s_internal_vm_info_string = Abstract_VM_Version::internal_vm_info_string();
bool Abstract_VM_Version::_supports_cx8 = false;
#ifndef HOTSPOT_RELEASE_VERSION
#endif
#ifndef JRE_RELEASE_VERSION
#endif
#ifndef HOTSPOT_BUILD_TARGET
#endif
#ifdef PRODUCT
#define VM_RELEASE HOTSPOT_RELEASE_VERSION
#else
#endif
// HOTSPOT_RELEASE_VERSION must follow the release version naming convention
// <major_ver>.<minor_ver>-b<nn>[-<identifier>][-<debug_target>]
int Abstract_VM_Version::_vm_major_version = 0;
int Abstract_VM_Version::_vm_minor_version = 0;
int Abstract_VM_Version::_vm_build_number = 0;
bool Abstract_VM_Version::_initialized = false;
int Abstract_VM_Version::_parallel_worker_threads = 0;
bool Abstract_VM_Version::_parallel_worker_threads_initialized = false;
void Abstract_VM_Version::initialize() {
if (_initialized) {
return;
}
// Expecting the next vm_version format:
// <major_ver>.<minor_ver>-b<nn>[-<identifier>]
char* vm_major_ver = vm_version;
vm_minor_ver += 1;
assert(vm_build_num != NULL && vm_build_num[1] == 'b' && isdigit(vm_build_num[2]),"wrong vm build number");
vm_build_num += 2;
_initialized = true;
}
#if defined(_LP64)
#define VMLP "64-Bit "
#else
#define VMLP ""
#endif
#ifdef KERNEL
#define VMTYPE "Kernel"
#else // KERNEL
#ifdef TIERED
#define VMTYPE "Server"
#else
COMPILER2_PRESENT("Server")
#endif // TIERED
#endif // KERNEL
#ifndef HOTSPOT_VM_DISTRO
#endif
const char* Abstract_VM_Version::vm_name() {
return VMNAME;
}
const char* Abstract_VM_Version::vm_vendor() {
#ifdef VENDOR
#else
return "Sun Microsystems Inc.";
#endif
}
const char* Abstract_VM_Version::vm_info_string() {
};
return "";
}
// NOTE: do *not* use stringStream. this function is called by
// fatal error handler. if the crash is in native thread,
// stringStream cannot get resource allocated and will SEGV.
const char* Abstract_VM_Version::vm_release() {
return VM_RELEASE;
}
WINDOWS_ONLY("windows") \
SOLARIS_ONLY("solaris")
IA64_ONLY("ia64") \
AMD64_ONLY("amd64") \
SPARC_ONLY("sparc")
const char *Abstract_VM_Version::vm_platform_string() {
}
const char* Abstract_VM_Version::internal_vm_info_string() {
#ifndef HOTSPOT_BUILD_USER
#define HOTSPOT_BUILD_USER unknown
#endif
#ifndef HOTSPOT_BUILD_COMPILER
#ifdef _MSC_VER
#if _MSC_VER == 1100
#define HOTSPOT_BUILD_COMPILER "MS VC++ 5.0"
#define HOTSPOT_BUILD_COMPILER "MS VC++ 6.0"
#define HOTSPOT_BUILD_COMPILER "MS VC++ 7.1 (VS2003)"
#define HOTSPOT_BUILD_COMPILER "MS VC++ 8.0 (VS2005)"
#define HOTSPOT_BUILD_COMPILER "MS VC++ 9.0 (VS2008)"
#else
#endif
#elif defined(__SUNPRO_CC)
#if __SUNPRO_CC == 0x420
#define HOTSPOT_BUILD_COMPILER "Workshop 4.2"
#define HOTSPOT_BUILD_COMPILER "Workshop 5.8"
#define HOTSPOT_BUILD_COMPILER "Workshop 5.9"
#else
#endif
#else
#define HOTSPOT_BUILD_COMPILER "unknown compiler"
#endif
#endif
}
unsigned int Abstract_VM_Version::jvm_version() {
}
void VM_Version_init() {
VM_Version::initialize();
#ifndef PRODUCT
if (PrintMiscellaneous && Verbose) {
}
#endif
}
unsigned int Abstract_VM_Version::nof_parallel_worker_threads(
unsigned int num,
unsigned int den,
unsigned int switch_pt) {
if (FLAG_IS_DEFAULT(ParallelGCThreads)) {
// For very large machines, there are diminishing returns
// for large numbers of worker threads. Instead of
// hogging the whole system, use a fraction of the workers for every
// processor after the first 8. For example, on a 72 cpu machine
// and a chosen fraction of 5/8
// use 8 + (72 - 8) * (5/8) == 48 worker threads.
ncpus :
} else {
return ParallelGCThreads;
}
}
unsigned int Abstract_VM_Version::calc_parallel_worker_threads() {
}
// Does not set the _initialized flag since it is
// a global flag.
unsigned int Abstract_VM_Version::parallel_worker_threads() {
if (FLAG_IS_DEFAULT(ParallelGCThreads)) {
} else {
}
}
return _parallel_worker_threads;
}