/* * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
#include"memory/allStatic.hpp"// For declaration of class AllStatic #include"utilities/globalDefinitions.hpp"
typedefenum {
NoDetectedVirtualization,
XenHVM,
KVM,
VMWare,
HyperV,
HyperVRole,
PowerVM, // on AIX or Linux ppc64(le)
PowerFullPartitionMode, // on Linux ppc64(le)
PowerKVM
} VirtualizationType;
class outputStream;
// Abstract_VM_Version provides information about the VM.
class Abstract_VM_Version: AllStatic { friendclass VMStructs; friendclass JVMCIVMStructs;
public: // Called as part of the runtime services initialization which is // called from the management module initialization (via init_globals()) // after argument parsing and attaching of the main thread has // occurred. Examines a variety of the hardware capabilities of // the platform to determine which features can be used to execute the // program. staticvoid initialize() { }
// This allows for early initialization of VM_Version information // that may be needed later in the initialization sequence but before // full VM_Version initialization is possible. It can not depend on any // other part of the VM being initialized when called. Platforms that // need to specialize this define VM_Version::early_initialize(). staticvoid early_initialize() { }
// Called to initialize VM variables needing initialization // after command line parsing. Platforms that need to specialize // this should define VM_Version::init_before_ergo(). staticvoid init_before_ergo() {}
// Name staticconstchar* vm_name(); // Vendor staticconstchar* vm_vendor(); // VM version information string printed by launcher (java -version) staticconstchar* vm_info_string(); staticconstchar* vm_release(); staticconstchar* vm_platform_string();
// platforms that need to specialize this // define VM_Version::print_platform_virtualization_info() staticvoid print_platform_virtualization_info(outputStream*) { }
// does HW support an 8-byte compare-exchange operation? staticbool supports_cx8() { #ifdef SUPPORTS_NATIVE_CX8 returntrue; #else return _supports_cx8; #endif
} // does HW support atomic get-and-set or atomic get-and-add? Used // to guide intrinsification decisions for Unsafe atomic ops staticbool supports_atomic_getset4() {return _supports_atomic_getset4;} staticbool supports_atomic_getset8() {return _supports_atomic_getset8;} staticbool supports_atomic_getadd4() {return _supports_atomic_getadd4;} staticbool supports_atomic_getadd8() {return _supports_atomic_getadd8;}
// the size in bytes of a data cache line flushed by a flush // operation which should be a power of two or zero if cache line // writeback is not supported by the current os_cpu combination staticunsignedint data_cache_line_flush_size() { return _data_cache_line_flush_size;
}
// returns true if and only if cache line writeback is supported staticbool supports_data_cache_line_flush() { return _data_cache_line_flush_size != 0;
}
// Denominator for computing default ParallelGCThreads for machines with // a large number of cores. static uint parallel_worker_threads_denominator() { return 8; }
// Does this CPU support spin wait instruction? staticbool supports_on_spin_wait() { returnfalse; }
// Does platform support fast class initialization checks for static methods? staticbool supports_fast_class_init_checks() { returnfalse; }
// Does platform support stack watermark barriers for concurrent stack processing?
constexpr staticbool supports_stack_watermark_barrier() { returnfalse; }
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.