< prev index next >

src/hotspot/share/runtime/abstract_vm_version.hpp

Print this page

 25 #ifndef SHARE_RUNTIME_ABSTRACT_VM_VERSION_HPP
 26 #define SHARE_RUNTIME_ABSTRACT_VM_VERSION_HPP
 27 
 28 #include "memory/allStatic.hpp"  // For declaration of class AllStatic
 29 #include "utilities/globalDefinitions.hpp"
 30 
 31 typedef enum {
 32   NoDetectedVirtualization,
 33   XenHVM,
 34   XenPVHVM, // mix-mode on Linux aarch64
 35   KVM,
 36   VMWare,
 37   HyperV,
 38   HyperVRole,
 39   PowerVM, // on AIX or Linux ppc64(le)
 40   PowerFullPartitionMode, // on Linux ppc64(le)
 41   PowerKVM
 42 } VirtualizationType;
 43 
 44 class outputStream;

 45 enum class vmIntrinsicID;
 46 
 47 // Abstract_VM_Version provides information about the VM.
 48 
 49 class Abstract_VM_Version: AllStatic {
 50   friend class VMStructs;
 51   friend class JVMCIVMStructs;
 52 
 53  protected:
 54   static const char*  _s_vm_release;
 55   static const char*  _s_internal_vm_info_string;
 56 
 57   // CPU feature flags, can be affected by VM settings.
 58   static uint64_t _features;
 59 
 60   static const char* _features_string;
 61 
 62   static const char* _cpu_info_string;
 63 
 64   // Original CPU feature flags, not affected by VM settings.

209 
210  protected:
211   // VM_Version statics
212   static const size_t      CPU_TYPE_DESC_BUF_SIZE = 256;
213   static const size_t      CPU_DETAILED_DESC_BUF_SIZE = 4096;
214 
215   static int   _no_of_threads;
216   static int   _no_of_cores;
217   static int   _no_of_sockets;
218   static bool  _initialized;
219   static char  _cpu_name[CPU_TYPE_DESC_BUF_SIZE];
220   static char  _cpu_desc[CPU_DETAILED_DESC_BUF_SIZE];
221 
222  public:
223   static int number_of_threads(void);
224   static int number_of_cores(void);
225   static int number_of_sockets(void);
226 
227   static const char* cpu_name(void);
228   static const char* cpu_description(void);













229 };
230 
231 #endif // SHARE_RUNTIME_ABSTRACT_VM_VERSION_HPP

 25 #ifndef SHARE_RUNTIME_ABSTRACT_VM_VERSION_HPP
 26 #define SHARE_RUNTIME_ABSTRACT_VM_VERSION_HPP
 27 
 28 #include "memory/allStatic.hpp"  // For declaration of class AllStatic
 29 #include "utilities/globalDefinitions.hpp"
 30 
 31 typedef enum {
 32   NoDetectedVirtualization,
 33   XenHVM,
 34   XenPVHVM, // mix-mode on Linux aarch64
 35   KVM,
 36   VMWare,
 37   HyperV,
 38   HyperVRole,
 39   PowerVM, // on AIX or Linux ppc64(le)
 40   PowerFullPartitionMode, // on Linux ppc64(le)
 41   PowerKVM
 42 } VirtualizationType;
 43 
 44 class outputStream;
 45 class stringStream;
 46 enum class vmIntrinsicID;
 47 
 48 // Abstract_VM_Version provides information about the VM.
 49 
 50 class Abstract_VM_Version: AllStatic {
 51   friend class VMStructs;
 52   friend class JVMCIVMStructs;
 53 
 54  protected:
 55   static const char*  _s_vm_release;
 56   static const char*  _s_internal_vm_info_string;
 57 
 58   // CPU feature flags, can be affected by VM settings.
 59   static uint64_t _features;
 60 
 61   static const char* _features_string;
 62 
 63   static const char* _cpu_info_string;
 64 
 65   // Original CPU feature flags, not affected by VM settings.

210 
211  protected:
212   // VM_Version statics
213   static const size_t      CPU_TYPE_DESC_BUF_SIZE = 256;
214   static const size_t      CPU_DETAILED_DESC_BUF_SIZE = 4096;
215 
216   static int   _no_of_threads;
217   static int   _no_of_cores;
218   static int   _no_of_sockets;
219   static bool  _initialized;
220   static char  _cpu_name[CPU_TYPE_DESC_BUF_SIZE];
221   static char  _cpu_desc[CPU_DETAILED_DESC_BUF_SIZE];
222 
223  public:
224   static int number_of_threads(void);
225   static int number_of_cores(void);
226   static int number_of_sockets(void);
227 
228   static const char* cpu_name(void);
229   static const char* cpu_description(void);
230 
231   static void get_cpu_features_name(void* features_buffer, stringStream& ss) { return; }
232   static void get_missing_features_name(void* features_buffer, stringStream& ss) { return; }
233 
234   // Returns number of bytes required to store cpu features representation
235   static int cpu_features_size() { return 0; }
236 
237   // Stores arch dependent cpu features representation in the provided buffer.
238   // Size of the buffer must be same as returned by cpu_features_size()
239   static void store_cpu_features(void* buf) { return; }
240 
241   // features_to_test is an opaque object that stores arch specific representation of cpu features
242   static bool supports_features(void* features_to_test) { return false; };
243 };
244 
245 #endif // SHARE_RUNTIME_ABSTRACT_VM_VERSION_HPP
< prev index next >