mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
8233787: Break cycle in vm_version* includes
Reviewed-by: kbarrett, mdoerr
This commit is contained in:
parent
5e7123d669
commit
91b7fd7659
50 changed files with 583 additions and 528 deletions
|
@ -57,7 +57,7 @@ JVM_LIBS += \
|
||||||
JVM_EXCLUDE_FILES += args.cc
|
JVM_EXCLUDE_FILES += args.cc
|
||||||
JVM_EXCLUDES += adlc
|
JVM_EXCLUDES += adlc
|
||||||
|
|
||||||
# Needed by vm_version.cpp
|
# Needed by abstract_vm_version.cpp
|
||||||
ifeq ($(call isTargetCpu, x86_64), true)
|
ifeq ($(call isTargetCpu, x86_64), true)
|
||||||
OPENJDK_TARGET_CPU_VM_VERSION := amd64
|
OPENJDK_TARGET_CPU_VM_VERSION := amd64
|
||||||
else ifeq ($(call isTargetCpu, sparcv9), true)
|
else ifeq ($(call isTargetCpu, sparcv9), true)
|
||||||
|
@ -183,7 +183,7 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
|
||||||
EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
|
EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
|
||||||
EXTRA_OBJECT_FILES := $(DTRACE_EXTRA_OBJECT_FILES), \
|
EXTRA_OBJECT_FILES := $(DTRACE_EXTRA_OBJECT_FILES), \
|
||||||
CFLAGS := $(JVM_CFLAGS), \
|
CFLAGS := $(JVM_CFLAGS), \
|
||||||
vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
|
abstract_vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
|
||||||
arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
|
arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
|
||||||
DISABLED_WARNINGS_gcc := $(DISABLED_WARNINGS_gcc), \
|
DISABLED_WARNINGS_gcc := $(DISABLED_WARNINGS_gcc), \
|
||||||
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang), \
|
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang), \
|
||||||
|
@ -206,11 +206,11 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
|
||||||
DEFINE_THIS_FILE := false, \
|
DEFINE_THIS_FILE := false, \
|
||||||
))
|
))
|
||||||
|
|
||||||
# Always recompile vm_version.cpp if libjvm needs to be relinked. This ensures
|
# Always recompile abstract_vm_version.cpp if libjvm needs to be relinked. This ensures
|
||||||
# that the internal vm version is updated as it relies on __DATE__ and __TIME__
|
# that the internal vm version is updated as it relies on __DATE__ and __TIME__
|
||||||
# macros.
|
# macros.
|
||||||
VM_VERSION_OBJ := $(JVM_OUTPUTDIR)/objs/vm_version$(OBJ_SUFFIX)
|
ABSTRACT_VM_VERSION_OBJ := $(JVM_OUTPUTDIR)/objs/abstract_vm_version$(OBJ_SUFFIX)
|
||||||
$(VM_VERSION_OBJ): $(filter-out $(VM_VERSION_OBJ) $(JVM_MAPFILE), \
|
$(ABSTRACT_VM_VERSION_OBJ): $(filter-out $(ABSTRACT_VM_VERSION_OBJ) $(JVM_MAPFILE), \
|
||||||
$(BUILD_LIBJVM_TARGET_DEPS))
|
$(BUILD_LIBJVM_TARGET_DEPS))
|
||||||
|
|
||||||
ifneq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
|
ifneq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
#include "runtime/java.hpp"
|
#include "runtime/java.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "runtime/stubCodeGenerator.hpp"
|
#include "runtime/stubCodeGenerator.hpp"
|
||||||
|
#include "runtime/vm_version.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
#include "vm_version_aarch64.hpp"
|
|
||||||
|
|
||||||
#include OS_HEADER_INLINE(os)
|
#include OS_HEADER_INLINE(os)
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
#ifndef CPU_AARCH64_VM_VERSION_AARCH64_HPP
|
#ifndef CPU_AARCH64_VM_VERSION_AARCH64_HPP
|
||||||
#define CPU_AARCH64_VM_VERSION_AARCH64_HPP
|
#define CPU_AARCH64_VM_VERSION_AARCH64_HPP
|
||||||
|
|
||||||
|
#include "runtime/abstract_vm_version.hpp"
|
||||||
#include "runtime/globals_extension.hpp"
|
#include "runtime/globals_extension.hpp"
|
||||||
#include "runtime/vm_version.hpp"
|
|
||||||
#include "utilities/sizes.hpp"
|
#include "utilities/sizes.hpp"
|
||||||
|
|
||||||
class VM_Version : public Abstract_VM_Version {
|
class VM_Version : public Abstract_VM_Version {
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#ifndef CPU_AARCH64_VM_VERSION_EXT_AARCH64_HPP
|
#ifndef CPU_AARCH64_VM_VERSION_EXT_AARCH64_HPP
|
||||||
#define CPU_AARCH64_VM_VERSION_EXT_AARCH64_HPP
|
#define CPU_AARCH64_VM_VERSION_EXT_AARCH64_HPP
|
||||||
|
|
||||||
|
#include "runtime/vm_version.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
#include "vm_version_aarch64.hpp"
|
|
||||||
|
|
||||||
class VM_Version_Ext : public VM_Version {
|
class VM_Version_Ext : public VM_Version {
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#define CPU_ARM_REGISTER_ARM_HPP
|
#define CPU_ARM_REGISTER_ARM_HPP
|
||||||
|
|
||||||
#include "asm/register.hpp"
|
#include "asm/register.hpp"
|
||||||
#include "vm_version_arm.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
class VMRegImpl;
|
class VMRegImpl;
|
||||||
typedef VMRegImpl* VMReg;
|
typedef VMRegImpl* VMReg;
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#ifndef CPU_ARM_VM_VERSION_ARM_HPP
|
#ifndef CPU_ARM_VM_VERSION_ARM_HPP
|
||||||
#define CPU_ARM_VM_VERSION_ARM_HPP
|
#define CPU_ARM_VM_VERSION_ARM_HPP
|
||||||
|
|
||||||
|
#include "runtime/abstract_vm_version.hpp"
|
||||||
#include "runtime/globals_extension.hpp"
|
#include "runtime/globals_extension.hpp"
|
||||||
#include "runtime/vm_version.hpp"
|
|
||||||
|
|
||||||
class VM_Version: public Abstract_VM_Version {
|
class VM_Version: public Abstract_VM_Version {
|
||||||
friend class JVMCIVMStructs;
|
friend class JVMCIVMStructs;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
#include "runtime/java.hpp"
|
#include "runtime/java.hpp"
|
||||||
#include "runtime/os.inline.hpp"
|
#include "runtime/os.inline.hpp"
|
||||||
#include "runtime/stubCodeGenerator.hpp"
|
#include "runtime/stubCodeGenerator.hpp"
|
||||||
#include "vm_version_arm.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
int VM_Version::_stored_pc_adjustment = 4;
|
int VM_Version::_stored_pc_adjustment = 4;
|
||||||
int VM_Version::_arm_arch = 5;
|
int VM_Version::_arm_arch = 5;
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#ifndef CPU_ARM_VM_VERSION_EXT_ARM_HPP
|
#ifndef CPU_ARM_VM_VERSION_EXT_ARM_HPP
|
||||||
#define CPU_ARM_VM_VERSION_EXT_ARM_HPP
|
#define CPU_ARM_VM_VERSION_EXT_ARM_HPP
|
||||||
|
|
||||||
|
#include "runtime/vm_version.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
#include "vm_version_arm.hpp"
|
|
||||||
|
|
||||||
class VM_Version_Ext : public VM_Version {
|
class VM_Version_Ext : public VM_Version {
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#ifndef CPU_PPC_VM_VERSION_EXT_PPC_HPP
|
#ifndef CPU_PPC_VM_VERSION_EXT_PPC_HPP
|
||||||
#define CPU_PPC_VM_VERSION_EXT_PPC_HPP
|
#define CPU_PPC_VM_VERSION_EXT_PPC_HPP
|
||||||
|
|
||||||
|
#include "runtime/vm_version.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
#include "vm_version_ppc.hpp"
|
|
||||||
|
|
||||||
#define CPU_INFO "cpu_info"
|
#define CPU_INFO "cpu_info"
|
||||||
#define CPU_TYPE "fpu_type"
|
#define CPU_TYPE "fpu_type"
|
||||||
|
|
|
@ -32,10 +32,10 @@
|
||||||
#include "runtime/java.hpp"
|
#include "runtime/java.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "runtime/stubCodeGenerator.hpp"
|
#include "runtime/stubCodeGenerator.hpp"
|
||||||
|
#include "runtime/vm_version.hpp"
|
||||||
#include "utilities/align.hpp"
|
#include "utilities/align.hpp"
|
||||||
#include "utilities/defaultStream.hpp"
|
#include "utilities/defaultStream.hpp"
|
||||||
#include "utilities/globalDefinitions.hpp"
|
#include "utilities/globalDefinitions.hpp"
|
||||||
#include "vm_version_ppc.hpp"
|
|
||||||
|
|
||||||
#include <sys/sysinfo.h>
|
#include <sys/sysinfo.h>
|
||||||
#if defined(_AIX)
|
#if defined(_AIX)
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
#ifndef CPU_PPC_VM_VERSION_PPC_HPP
|
#ifndef CPU_PPC_VM_VERSION_PPC_HPP
|
||||||
#define CPU_PPC_VM_VERSION_PPC_HPP
|
#define CPU_PPC_VM_VERSION_PPC_HPP
|
||||||
|
|
||||||
|
#include "runtime/abstract_vm_version.hpp"
|
||||||
#include "runtime/globals_extension.hpp"
|
#include "runtime/globals_extension.hpp"
|
||||||
#include "runtime/vm_version.hpp"
|
|
||||||
|
|
||||||
class VM_Version: public Abstract_VM_Version {
|
class VM_Version: public Abstract_VM_Version {
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2016, 2017 SAP SE. All rights reserved.
|
* Copyright (c) 2016, 2019 SAP SE. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
#define CPU_S390_REGISTER_S390_HPP
|
#define CPU_S390_REGISTER_S390_HPP
|
||||||
|
|
||||||
#include "asm/register.hpp"
|
#include "asm/register.hpp"
|
||||||
#include "vm_version_s390.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
class Address;
|
class Address;
|
||||||
class VMRegImpl;
|
class VMRegImpl;
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#ifndef CPU_S390_VM_VERSION_EXT_S390_HPP
|
#ifndef CPU_S390_VM_VERSION_EXT_S390_HPP
|
||||||
#define CPU_S390_VM_VERSION_EXT_S390_HPP
|
#define CPU_S390_VM_VERSION_EXT_S390_HPP
|
||||||
|
|
||||||
|
#include "runtime/vm_version.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
#include "vm_version_s390.hpp"
|
|
||||||
|
|
||||||
#define CPU_INFO "cpu_info"
|
#define CPU_INFO "cpu_info"
|
||||||
#define CPU_TYPE "fpu_type"
|
#define CPU_TYPE "fpu_type"
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
#include "runtime/java.hpp"
|
#include "runtime/java.hpp"
|
||||||
#include "runtime/stubCodeGenerator.hpp"
|
#include "runtime/stubCodeGenerator.hpp"
|
||||||
#include "vm_version_s390.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
# include <sys/sysinfo.h>
|
# include <sys/sysinfo.h>
|
||||||
|
|
||||||
|
@ -44,8 +44,8 @@ unsigned long VM_Version::_msgdigest_features[_features_buffer_len] = {0, 0, 0,
|
||||||
unsigned int VM_Version::_nfeatures = 0;
|
unsigned int VM_Version::_nfeatures = 0;
|
||||||
unsigned int VM_Version::_ncipher_features = 0;
|
unsigned int VM_Version::_ncipher_features = 0;
|
||||||
unsigned int VM_Version::_nmsgdigest_features = 0;
|
unsigned int VM_Version::_nmsgdigest_features = 0;
|
||||||
unsigned int VM_Version::_Dcache_lineSize = 256;
|
unsigned int VM_Version::_Dcache_lineSize = DEFAULT_CACHE_LINE_SIZE;
|
||||||
unsigned int VM_Version::_Icache_lineSize = 256;
|
unsigned int VM_Version::_Icache_lineSize = DEFAULT_CACHE_LINE_SIZE;
|
||||||
|
|
||||||
static const char* z_gen[] = {" ", "G1", "G2", "G3", "G4", "G5", "G6", "G7" };
|
static const char* z_gen[] = {" ", "G1", "G2", "G3", "G4", "G5", "G6", "G7" };
|
||||||
static const char* z_machine[] = {" ", "2064", "2084", "2094", "2097", "2817", " ", "2964" };
|
static const char* z_machine[] = {" ", "2064", "2084", "2094", "2097", "2817", " ", "2964" };
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2016, 2018 SAP SE. All rights reserved.
|
* Copyright (c) 2016, 2019 SAP SE. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -27,8 +27,8 @@
|
||||||
#define CPU_S390_VM_VERSION_S390_HPP
|
#define CPU_S390_VM_VERSION_S390_HPP
|
||||||
|
|
||||||
|
|
||||||
|
#include "runtime/abstract_vm_version.hpp"
|
||||||
#include "runtime/globals_extension.hpp"
|
#include "runtime/globals_extension.hpp"
|
||||||
#include "runtime/vm_version.hpp"
|
|
||||||
|
|
||||||
class VM_Version: public Abstract_VM_Version {
|
class VM_Version: public Abstract_VM_Version {
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#ifndef CPU_SPARC_VM_VERSION_EXT_SPARC_HPP
|
#ifndef CPU_SPARC_VM_VERSION_EXT_SPARC_HPP
|
||||||
#define CPU_SPARC_VM_VERSION_EXT_SPARC_HPP
|
#define CPU_SPARC_VM_VERSION_EXT_SPARC_HPP
|
||||||
|
|
||||||
|
#include "runtime/vm_version.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
#include "vm_version_sparc.hpp"
|
|
||||||
|
|
||||||
#if defined(SOLARIS)
|
#if defined(SOLARIS)
|
||||||
#include <kstat.h>
|
#include <kstat.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
#include "runtime/java.hpp"
|
#include "runtime/java.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "runtime/stubCodeGenerator.hpp"
|
#include "runtime/stubCodeGenerator.hpp"
|
||||||
#include "vm_version_sparc.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#ifndef CPU_SPARC_VM_VERSION_SPARC_HPP
|
#ifndef CPU_SPARC_VM_VERSION_SPARC_HPP
|
||||||
#define CPU_SPARC_VM_VERSION_SPARC_HPP
|
#define CPU_SPARC_VM_VERSION_SPARC_HPP
|
||||||
|
|
||||||
|
#include "runtime/abstract_vm_version.hpp"
|
||||||
#include "runtime/globals_extension.hpp"
|
#include "runtime/globals_extension.hpp"
|
||||||
#include "runtime/vm_version.hpp"
|
|
||||||
|
|
||||||
class VM_Version: public Abstract_VM_Version {
|
class VM_Version: public Abstract_VM_Version {
|
||||||
friend class VMStructs;
|
friend class VMStructs;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#define CPU_X86_ASSEMBLER_X86_HPP
|
#define CPU_X86_ASSEMBLER_X86_HPP
|
||||||
|
|
||||||
#include "asm/register.hpp"
|
#include "asm/register.hpp"
|
||||||
#include "vm_version_x86.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
class BiasedLockingCounters;
|
class BiasedLockingCounters;
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "runtime/safepointMechanism.hpp"
|
#include "runtime/safepointMechanism.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/vframeArray.hpp"
|
#include "runtime/vframeArray.hpp"
|
||||||
|
#include "runtime/vm_version.hpp"
|
||||||
#include "utilities/align.hpp"
|
#include "utilities/align.hpp"
|
||||||
#include "vmreg_x86.inline.hpp"
|
#include "vmreg_x86.inline.hpp"
|
||||||
#ifdef COMPILER1
|
#ifdef COMPILER1
|
||||||
|
@ -46,7 +47,6 @@
|
||||||
#ifdef COMPILER2
|
#ifdef COMPILER2
|
||||||
#include "opto/runtime.hpp"
|
#include "opto/runtime.hpp"
|
||||||
#endif
|
#endif
|
||||||
#include "vm_version_x86.hpp"
|
|
||||||
|
|
||||||
#define __ masm->
|
#define __ masm->
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,9 @@
|
||||||
#include "runtime/safepointMechanism.hpp"
|
#include "runtime/safepointMechanism.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/vframeArray.hpp"
|
#include "runtime/vframeArray.hpp"
|
||||||
|
#include "runtime/vm_version.hpp"
|
||||||
#include "utilities/align.hpp"
|
#include "utilities/align.hpp"
|
||||||
#include "utilities/formatBuffer.hpp"
|
#include "utilities/formatBuffer.hpp"
|
||||||
#include "vm_version_x86.hpp"
|
|
||||||
#include "vmreg_x86.inline.hpp"
|
#include "vmreg_x86.inline.hpp"
|
||||||
#ifdef COMPILER1
|
#ifdef COMPILER1
|
||||||
#include "c1/c1_Runtime1.hpp"
|
#include "c1/c1_Runtime1.hpp"
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#ifndef CPU_X86_VM_VERSION_EXT_X86_HPP
|
#ifndef CPU_X86_VM_VERSION_EXT_X86_HPP
|
||||||
#define CPU_X86_VM_VERSION_EXT_X86_HPP
|
#define CPU_X86_VM_VERSION_EXT_X86_HPP
|
||||||
|
|
||||||
|
#include "runtime/vm_version.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
#include "vm_version_x86.hpp"
|
|
||||||
|
|
||||||
class VM_Version_Ext : public VM_Version {
|
class VM_Version_Ext : public VM_Version {
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
#include "runtime/java.hpp"
|
#include "runtime/java.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "runtime/stubCodeGenerator.hpp"
|
#include "runtime/stubCodeGenerator.hpp"
|
||||||
|
#include "runtime/vm_version.hpp"
|
||||||
#include "utilities/virtualizationSupport.hpp"
|
#include "utilities/virtualizationSupport.hpp"
|
||||||
#include "vm_version_x86.hpp"
|
|
||||||
|
|
||||||
#include OS_HEADER_INLINE(os)
|
#include OS_HEADER_INLINE(os)
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
#define CPU_X86_VM_VERSION_X86_HPP
|
#define CPU_X86_VM_VERSION_X86_HPP
|
||||||
|
|
||||||
#include "memory/universe.hpp"
|
#include "memory/universe.hpp"
|
||||||
|
#include "runtime/abstract_vm_version.hpp"
|
||||||
#include "runtime/globals_extension.hpp"
|
#include "runtime/globals_extension.hpp"
|
||||||
#include "runtime/vm_version.hpp"
|
|
||||||
|
|
||||||
class VM_Version : public Abstract_VM_Version {
|
class VM_Version : public Abstract_VM_Version {
|
||||||
friend class VMStructs;
|
friend class VMStructs;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#define CPU_ZERO_REGISTER_ZERO_HPP
|
#define CPU_ZERO_REGISTER_ZERO_HPP
|
||||||
|
|
||||||
#include "asm/register.hpp"
|
#include "asm/register.hpp"
|
||||||
#include "vm_version_zero.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
class VMRegImpl;
|
class VMRegImpl;
|
||||||
typedef VMRegImpl* VMReg;
|
typedef VMRegImpl* VMReg;
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#ifndef CPU_ZERO_VM_VERSION_EXT_ZERO_HPP
|
#ifndef CPU_ZERO_VM_VERSION_EXT_ZERO_HPP
|
||||||
#define CPU_ZERO_VM_VERSION_EXT_ZERO_HPP
|
#define CPU_ZERO_VM_VERSION_EXT_ZERO_HPP
|
||||||
|
|
||||||
|
#include "runtime/vm_version.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
#include "vm_version_zero.hpp"
|
|
||||||
|
|
||||||
class VM_Version_Ext : public VM_Version {
|
class VM_Version_Ext : public VM_Version {
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright 2009 Red Hat, Inc.
|
* Copyright 2009 Red Hat, Inc.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
#include "runtime/java.hpp"
|
#include "runtime/java.hpp"
|
||||||
#include "runtime/stubCodeGenerator.hpp"
|
#include "runtime/stubCodeGenerator.hpp"
|
||||||
#include "vm_version_zero.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
|
|
||||||
void VM_Version::initialize() {
|
void VM_Version::initialize() {
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
#ifndef CPU_ZERO_VM_VERSION_ZERO_HPP
|
#ifndef CPU_ZERO_VM_VERSION_ZERO_HPP
|
||||||
#define CPU_ZERO_VM_VERSION_ZERO_HPP
|
#define CPU_ZERO_VM_VERSION_ZERO_HPP
|
||||||
|
|
||||||
|
#include "runtime/abstract_vm_version.hpp"
|
||||||
#include "runtime/globals_extension.hpp"
|
#include "runtime/globals_extension.hpp"
|
||||||
#include "runtime/vm_version.hpp"
|
|
||||||
|
|
||||||
class VM_Version : public Abstract_VM_Version {
|
class VM_Version : public Abstract_VM_Version {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "runtime/os_perf.hpp"
|
#include "runtime/os_perf.hpp"
|
||||||
#include "vm_version_ext_x86.hpp"
|
#include CPU_HEADER(vm_version_ext)
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#import <libproc.h>
|
#import <libproc.h>
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "runtime/os_perf.hpp"
|
#include "runtime/os_perf.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
#include "vm_version_ext_x86.hpp"
|
#include CPU_HEADER(vm_version_ext)
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <psapi.h>
|
#include <psapi.h>
|
||||||
#include <TlHelp32.h>
|
#include <TlHelp32.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,4 +24,4 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "vm_version_x86.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright 2009 Red Hat, Inc.
|
* Copyright 2009 Red Hat, Inc.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
|
@ -25,6 +25,6 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "vm_version_zero.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
// This file is intentionally empty
|
// This file is intentionally empty
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
* Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
#ifndef OS_CPU_LINUX_AARCH64_ATOMIC_LINUX_AARCH64_HPP
|
#ifndef OS_CPU_LINUX_AARCH64_ATOMIC_LINUX_AARCH64_HPP
|
||||||
#define OS_CPU_LINUX_AARCH64_ATOMIC_LINUX_AARCH64_HPP
|
#define OS_CPU_LINUX_AARCH64_ATOMIC_LINUX_AARCH64_HPP
|
||||||
|
|
||||||
#include "vm_version_aarch64.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
// Implementation of class atomic
|
// Implementation of class atomic
|
||||||
// Note that memory_order_conservative requires a full barrier after atomic stores.
|
// Note that memory_order_conservative requires a full barrier after atomic stores.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
* Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
// Included in orderAccess.hpp header file.
|
// Included in orderAccess.hpp header file.
|
||||||
|
|
||||||
#include "vm_version_aarch64.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
// Implementation of class OrderAccess.
|
// Implementation of class OrderAccess.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
* Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -25,5 +25,5 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "vm_version_aarch64.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#define OS_CPU_LINUX_ARM_ATOMIC_LINUX_ARM_HPP
|
#define OS_CPU_LINUX_ARM_ATOMIC_LINUX_ARM_HPP
|
||||||
|
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "vm_version_arm.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
// Implementation of class atomic
|
// Implementation of class atomic
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
// Included in orderAccess.hpp header file.
|
// Included in orderAccess.hpp header file.
|
||||||
|
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "vm_version_arm.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
// Implementation of class OrderAccess.
|
// Implementation of class OrderAccess.
|
||||||
// - we define the high level barriers below and use the general
|
// - we define the high level barriers below and use the general
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "vm_version_arm.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
# include <sys/utsname.h>
|
# include <sys/utsname.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2016, 2018 SAP SE. All rights reserved.
|
* Copyright (c) 2016, 2019 SAP SE. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include "runtime/atomic.hpp"
|
#include "runtime/atomic.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "vm_version_s390.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
// Note that the compare-and-swap instructions on System z perform
|
// Note that the compare-and-swap instructions on System z perform
|
||||||
// a serialization function before the storage operand is fetched
|
// a serialization function before the storage operand is fetched
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2016 SAP SE. All rights reserved.
|
* Copyright (c) 2016, 2019 SAP SE. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
// Included in orderAccess.hpp header file.
|
// Included in orderAccess.hpp header file.
|
||||||
|
|
||||||
#include "vm_version_s390.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
// Implementation of class OrderAccess.
|
// Implementation of class OrderAccess.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
#include "logging/log.hpp"
|
#include "logging/log.hpp"
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "vm_version_sparc.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
|
|
||||||
#define CPUINFO_LINE_SIZE 1024
|
#define CPUINFO_LINE_SIZE 1024
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,5 +24,5 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "vm_version_x86.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright 2009 Red Hat, Inc.
|
* Copyright 2009 Red Hat, Inc.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
|
@ -25,6 +25,6 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "vm_version_zero.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
// This file is intentionally empty
|
// This file is intentionally empty
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
#include "memory/allocation.hpp"
|
#include "memory/allocation.hpp"
|
||||||
#include "memory/allocation.inline.hpp"
|
#include "memory/allocation.inline.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "vm_version_sparc.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
#include <sys/auxv.h>
|
#include <sys/auxv.h>
|
||||||
#include <sys/systeminfo.h>
|
#include <sys/systeminfo.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,5 +24,5 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "vm_version_x86.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -24,5 +24,5 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "runtime/os.hpp"
|
#include "runtime/os.hpp"
|
||||||
#include "vm_version_x86.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
|
|
316
src/hotspot/share/runtime/abstract_vm_version.cpp
Normal file
316
src/hotspot/share/runtime/abstract_vm_version.cpp
Normal file
|
@ -0,0 +1,316 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 1998, 2019, 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 "precompiled.hpp"
|
||||||
|
#include "compiler/compilerDefinitions.hpp"
|
||||||
|
#include "runtime/arguments.hpp"
|
||||||
|
#include "runtime/vm_version.hpp"
|
||||||
|
#include "utilities/globalDefinitions.hpp"
|
||||||
|
|
||||||
|
const char* Abstract_VM_Version::_s_vm_release = Abstract_VM_Version::vm_release();
|
||||||
|
const char* Abstract_VM_Version::_s_internal_vm_info_string = Abstract_VM_Version::internal_vm_info_string();
|
||||||
|
|
||||||
|
uint64_t Abstract_VM_Version::_features = 0;
|
||||||
|
const char* Abstract_VM_Version::_features_string = "";
|
||||||
|
|
||||||
|
bool Abstract_VM_Version::_supports_cx8 = false;
|
||||||
|
bool Abstract_VM_Version::_supports_atomic_getset4 = false;
|
||||||
|
bool Abstract_VM_Version::_supports_atomic_getset8 = false;
|
||||||
|
bool Abstract_VM_Version::_supports_atomic_getadd4 = false;
|
||||||
|
bool Abstract_VM_Version::_supports_atomic_getadd8 = false;
|
||||||
|
unsigned int Abstract_VM_Version::_logical_processors_per_package = 1U;
|
||||||
|
unsigned int Abstract_VM_Version::_L1_data_cache_line_size = 0;
|
||||||
|
unsigned int Abstract_VM_Version::_data_cache_line_flush_size = 0;
|
||||||
|
|
||||||
|
VirtualizationType Abstract_VM_Version::_detected_virtualization = NoDetectedVirtualization;
|
||||||
|
|
||||||
|
#ifndef HOTSPOT_VERSION_STRING
|
||||||
|
#error HOTSPOT_VERSION_STRING must be defined
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef VERSION_FEATURE
|
||||||
|
#error VERSION_FEATURE must be defined
|
||||||
|
#endif
|
||||||
|
#ifndef VERSION_INTERIM
|
||||||
|
#error VERSION_INTERIM must be defined
|
||||||
|
#endif
|
||||||
|
#ifndef VERSION_UPDATE
|
||||||
|
#error VERSION_UPDATE must be defined
|
||||||
|
#endif
|
||||||
|
#ifndef VERSION_PATCH
|
||||||
|
#error VERSION_PATCH must be defined
|
||||||
|
#endif
|
||||||
|
#ifndef VERSION_BUILD
|
||||||
|
#error VERSION_BUILD must be defined
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef VERSION_STRING
|
||||||
|
#error VERSION_STRING must be defined
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DEBUG_LEVEL
|
||||||
|
#error DEBUG_LEVEL must be defined
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define VM_RELEASE HOTSPOT_VERSION_STRING
|
||||||
|
|
||||||
|
// HOTSPOT_VERSION_STRING equals the JDK VERSION_STRING (unless overridden
|
||||||
|
// in a standalone build).
|
||||||
|
int Abstract_VM_Version::_vm_major_version = VERSION_FEATURE;
|
||||||
|
int Abstract_VM_Version::_vm_minor_version = VERSION_INTERIM;
|
||||||
|
int Abstract_VM_Version::_vm_security_version = VERSION_UPDATE;
|
||||||
|
int Abstract_VM_Version::_vm_patch_version = VERSION_PATCH;
|
||||||
|
int Abstract_VM_Version::_vm_build_number = VERSION_BUILD;
|
||||||
|
|
||||||
|
#if defined(_LP64)
|
||||||
|
#define VMLP "64-Bit "
|
||||||
|
#else
|
||||||
|
#define VMLP ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef VMTYPE
|
||||||
|
#ifdef TIERED
|
||||||
|
#define VMTYPE "Server"
|
||||||
|
#else // TIERED
|
||||||
|
#ifdef ZERO
|
||||||
|
#define VMTYPE "Zero"
|
||||||
|
#else // ZERO
|
||||||
|
#define VMTYPE COMPILER1_PRESENT("Client") \
|
||||||
|
COMPILER2_PRESENT("Server")
|
||||||
|
#endif // ZERO
|
||||||
|
#endif // TIERED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HOTSPOT_VM_DISTRO
|
||||||
|
#error HOTSPOT_VM_DISTRO must be defined
|
||||||
|
#endif
|
||||||
|
#define VMNAME HOTSPOT_VM_DISTRO " " VMLP VMTYPE " VM"
|
||||||
|
|
||||||
|
const char* Abstract_VM_Version::vm_name() {
|
||||||
|
return VMNAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const char* Abstract_VM_Version::vm_vendor() {
|
||||||
|
#ifdef VENDOR
|
||||||
|
return VENDOR;
|
||||||
|
#else
|
||||||
|
return "Oracle Corporation";
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const char* Abstract_VM_Version::vm_info_string() {
|
||||||
|
switch (Arguments::mode()) {
|
||||||
|
case Arguments::_int:
|
||||||
|
return UseSharedSpaces ? "interpreted mode, sharing" : "interpreted mode";
|
||||||
|
case Arguments::_mixed:
|
||||||
|
if (UseSharedSpaces) {
|
||||||
|
if (UseAOT) {
|
||||||
|
return "mixed mode, aot, sharing";
|
||||||
|
#ifdef TIERED
|
||||||
|
} else if(is_client_compilation_mode_vm()) {
|
||||||
|
return "mixed mode, emulated-client, sharing";
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
return "mixed mode, sharing";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (UseAOT) {
|
||||||
|
return "mixed mode, aot";
|
||||||
|
#ifdef TIERED
|
||||||
|
} else if(is_client_compilation_mode_vm()) {
|
||||||
|
return "mixed mode, emulated-client";
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
return "mixed mode";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case Arguments::_comp:
|
||||||
|
#ifdef TIERED
|
||||||
|
if (is_client_compilation_mode_vm()) {
|
||||||
|
return UseSharedSpaces ? "compiled mode, emulated-client, sharing" : "compiled mode, emulated-client";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return UseSharedSpaces ? "compiled mode, sharing" : "compiled mode";
|
||||||
|
};
|
||||||
|
ShouldNotReachHere();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
// NOTE: do *not* use stringStream. this function is called by
|
||||||
|
// fatal error handlers. if the crash is in native thread,
|
||||||
|
// stringStream cannot get resource allocated and will SEGV.
|
||||||
|
const char* Abstract_VM_Version::jre_release_version() {
|
||||||
|
return VERSION_STRING;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define OS LINUX_ONLY("linux") \
|
||||||
|
WINDOWS_ONLY("windows") \
|
||||||
|
SOLARIS_ONLY("solaris") \
|
||||||
|
AIX_ONLY("aix") \
|
||||||
|
BSD_ONLY("bsd")
|
||||||
|
|
||||||
|
#ifndef CPU
|
||||||
|
#ifdef ZERO
|
||||||
|
#define CPU ZERO_LIBARCH
|
||||||
|
#elif defined(PPC64)
|
||||||
|
#if defined(VM_LITTLE_ENDIAN)
|
||||||
|
#define CPU "ppc64le"
|
||||||
|
#else
|
||||||
|
#define CPU "ppc64"
|
||||||
|
#endif // PPC64
|
||||||
|
#else
|
||||||
|
#define CPU AARCH64_ONLY("aarch64") \
|
||||||
|
AMD64_ONLY("amd64") \
|
||||||
|
IA32_ONLY("x86") \
|
||||||
|
IA64_ONLY("ia64") \
|
||||||
|
S390_ONLY("s390") \
|
||||||
|
SPARC_ONLY("sparc")
|
||||||
|
#endif // !ZERO
|
||||||
|
#endif // !CPU
|
||||||
|
|
||||||
|
const char *Abstract_VM_Version::vm_platform_string() {
|
||||||
|
return OS "-" CPU;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 == 1600
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "MS VC++ 10.0 (VS2010)"
|
||||||
|
#elif _MSC_VER == 1700
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "MS VC++ 11.0 (VS2012)"
|
||||||
|
#elif _MSC_VER == 1800
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "MS VC++ 12.0 (VS2013)"
|
||||||
|
#elif _MSC_VER == 1900
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "MS VC++ 14.0 (VS2015)"
|
||||||
|
#elif _MSC_VER == 1911
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.3 (VS2017)"
|
||||||
|
#elif _MSC_VER == 1912
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.5 (VS2017)"
|
||||||
|
#elif _MSC_VER == 1913
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.6 (VS2017)"
|
||||||
|
#elif _MSC_VER == 1914
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.7 (VS2017)"
|
||||||
|
#elif _MSC_VER == 1915
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.8 (VS2017)"
|
||||||
|
#else
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "unknown MS VC++:" XSTR(_MSC_VER)
|
||||||
|
#endif
|
||||||
|
#elif defined(__SUNPRO_CC)
|
||||||
|
#if __SUNPRO_CC == 0x580
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "Workshop 5.8"
|
||||||
|
#elif __SUNPRO_CC == 0x590
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "Workshop 5.9"
|
||||||
|
#elif __SUNPRO_CC == 0x5100
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "Sun Studio 12u1"
|
||||||
|
#elif __SUNPRO_CC == 0x5120
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "Sun Studio 12u3"
|
||||||
|
#elif __SUNPRO_CC == 0x5130
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "Sun Studio 12u4"
|
||||||
|
#else
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "unknown Workshop:" XSTR(__SUNPRO_CC)
|
||||||
|
#endif
|
||||||
|
#elif defined(__clang_version__)
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "clang " __VERSION__
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "gcc " __VERSION__
|
||||||
|
#else
|
||||||
|
#define HOTSPOT_BUILD_COMPILER "unknown compiler"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef FLOAT_ARCH
|
||||||
|
#if defined(__SOFTFP__)
|
||||||
|
#define FLOAT_ARCH_STR "-sflt"
|
||||||
|
#else
|
||||||
|
#define FLOAT_ARCH_STR ""
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define FLOAT_ARCH_STR XSTR(FLOAT_ARCH)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define INTERNAL_VERSION_SUFFIX VM_RELEASE ")" \
|
||||||
|
" for " OS "-" CPU FLOAT_ARCH_STR \
|
||||||
|
" JRE (" VERSION_STRING "), built on " __DATE__ " " __TIME__ \
|
||||||
|
" by " XSTR(HOTSPOT_BUILD_USER) " with " HOTSPOT_BUILD_COMPILER
|
||||||
|
|
||||||
|
return strcmp(DEBUG_LEVEL, "release") == 0
|
||||||
|
? VMNAME " (" INTERNAL_VERSION_SUFFIX
|
||||||
|
: VMNAME " (" DEBUG_LEVEL " " INTERNAL_VERSION_SUFFIX;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *Abstract_VM_Version::vm_build_user() {
|
||||||
|
return HOTSPOT_BUILD_USER;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *Abstract_VM_Version::jdk_debug_level() {
|
||||||
|
return DEBUG_LEVEL;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *Abstract_VM_Version::printable_jdk_debug_level() {
|
||||||
|
// Debug level is not printed for "release" builds
|
||||||
|
return strcmp(DEBUG_LEVEL, "release") == 0 ? "" : DEBUG_LEVEL " ";
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int Abstract_VM_Version::jvm_version() {
|
||||||
|
return ((Abstract_VM_Version::vm_major_version() & 0xFF) << 24) |
|
||||||
|
((Abstract_VM_Version::vm_minor_version() & 0xFF) << 16) |
|
||||||
|
((Abstract_VM_Version::vm_security_version() & 0xFF) << 8) |
|
||||||
|
(Abstract_VM_Version::vm_build_number() & 0xFF);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Abstract_VM_Version::print_matching_lines_from_file(const char* filename, outputStream* st, const char* keywords_to_match[]) {
|
||||||
|
char line[500];
|
||||||
|
FILE* fp = fopen(filename, "r");
|
||||||
|
if (fp == NULL) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
st->print_cr("Virtualization information:");
|
||||||
|
while (fgets(line, sizeof(line), fp) != NULL) {
|
||||||
|
int i = 0;
|
||||||
|
while (keywords_to_match[i] != NULL) {
|
||||||
|
if (strncmp(line, keywords_to_match[i], strlen(keywords_to_match[i])) == 0) {
|
||||||
|
st->print("%s", line);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fclose(fp);
|
||||||
|
return true;
|
||||||
|
}
|
194
src/hotspot/share/runtime/abstract_vm_version.hpp
Normal file
194
src/hotspot/share/runtime/abstract_vm_version.hpp
Normal file
|
@ -0,0 +1,194 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 1997, 2019, 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SHARE_RUNTIME_ABSTRACT_VM_VERSION_HPP
|
||||||
|
#define SHARE_RUNTIME_ABSTRACT_VM_VERSION_HPP
|
||||||
|
|
||||||
|
#include "memory/allocation.hpp" // For declaration of class AllStatic
|
||||||
|
#include "utilities/globalDefinitions.hpp"
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
NoDetectedVirtualization,
|
||||||
|
XenHVM,
|
||||||
|
KVM,
|
||||||
|
VMWare,
|
||||||
|
HyperV,
|
||||||
|
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 {
|
||||||
|
friend class VMStructs;
|
||||||
|
friend class JVMCIVMStructs;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
static const char* _s_vm_release;
|
||||||
|
static const char* _s_internal_vm_info_string;
|
||||||
|
|
||||||
|
// CPU feature flags.
|
||||||
|
static uint64_t _features;
|
||||||
|
static const char* _features_string;
|
||||||
|
|
||||||
|
// These are set by machine-dependent initializations
|
||||||
|
static bool _supports_cx8;
|
||||||
|
static bool _supports_atomic_getset4;
|
||||||
|
static bool _supports_atomic_getset8;
|
||||||
|
static bool _supports_atomic_getadd4;
|
||||||
|
static bool _supports_atomic_getadd8;
|
||||||
|
static unsigned int _logical_processors_per_package;
|
||||||
|
static unsigned int _L1_data_cache_line_size;
|
||||||
|
static int _vm_major_version;
|
||||||
|
static int _vm_minor_version;
|
||||||
|
static int _vm_security_version;
|
||||||
|
static int _vm_patch_version;
|
||||||
|
static int _vm_build_number;
|
||||||
|
static unsigned int _data_cache_line_flush_size;
|
||||||
|
|
||||||
|
static VirtualizationType _detected_virtualization;
|
||||||
|
|
||||||
|
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.
|
||||||
|
static void 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().
|
||||||
|
static void 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().
|
||||||
|
static void init_before_ergo() {}
|
||||||
|
|
||||||
|
// Name
|
||||||
|
static const char* vm_name();
|
||||||
|
// Vendor
|
||||||
|
static const char* vm_vendor();
|
||||||
|
// VM version information string printed by launcher (java -version)
|
||||||
|
static const char* vm_info_string();
|
||||||
|
static const char* vm_release();
|
||||||
|
static const char* vm_platform_string();
|
||||||
|
static const char* vm_build_user();
|
||||||
|
|
||||||
|
static int vm_major_version() { return _vm_major_version; }
|
||||||
|
static int vm_minor_version() { return _vm_minor_version; }
|
||||||
|
static int vm_security_version() { return _vm_security_version; }
|
||||||
|
static int vm_patch_version() { return _vm_patch_version; }
|
||||||
|
static int vm_build_number() { return _vm_build_number; }
|
||||||
|
|
||||||
|
// Gets the jvm_version_info.jvm_version defined in jvm.h
|
||||||
|
static unsigned int jvm_version();
|
||||||
|
|
||||||
|
// Internal version providing additional build information
|
||||||
|
static const char* internal_vm_info_string();
|
||||||
|
static const char* jre_release_version();
|
||||||
|
static const char* jdk_debug_level();
|
||||||
|
static const char* printable_jdk_debug_level();
|
||||||
|
|
||||||
|
static uint64_t features() {
|
||||||
|
return _features;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const char* features_string() {
|
||||||
|
return _features_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
static VirtualizationType get_detected_virtualization() {
|
||||||
|
return _detected_virtualization;
|
||||||
|
}
|
||||||
|
|
||||||
|
// platforms that need to specialize this
|
||||||
|
// define VM_Version::print_platform_virtualization_info()
|
||||||
|
static void print_platform_virtualization_info(outputStream*) { }
|
||||||
|
|
||||||
|
// does HW support an 8-byte compare-exchange operation?
|
||||||
|
static bool supports_cx8() {
|
||||||
|
#ifdef SUPPORTS_NATIVE_CX8
|
||||||
|
return true;
|
||||||
|
#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
|
||||||
|
static bool supports_atomic_getset4() {return _supports_atomic_getset4;}
|
||||||
|
static bool supports_atomic_getset8() {return _supports_atomic_getset8;}
|
||||||
|
static bool supports_atomic_getadd4() {return _supports_atomic_getadd4;}
|
||||||
|
static bool supports_atomic_getadd8() {return _supports_atomic_getadd8;}
|
||||||
|
|
||||||
|
static unsigned int logical_processors_per_package() {
|
||||||
|
return _logical_processors_per_package;
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned int L1_data_cache_line_size() {
|
||||||
|
return _L1_data_cache_line_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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
|
||||||
|
static unsigned int data_cache_line_flush_size() {
|
||||||
|
return _data_cache_line_flush_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
// returns true if and only if cache line writeback is supported
|
||||||
|
static bool supports_data_cache_line_flush() {
|
||||||
|
return _data_cache_line_flush_size != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ARCH specific policy for the BiasedLocking
|
||||||
|
static bool use_biased_locking() { return true; }
|
||||||
|
|
||||||
|
// Number of page sizes efficiently supported by the hardware. Most chips now
|
||||||
|
// support two sizes, thus this default implementation. Processor-specific
|
||||||
|
// subclasses should define new versions to hide this one as needed. Note
|
||||||
|
// that the O/S may support more sizes, but at most this many are used.
|
||||||
|
static uint page_size_count() { return 2; }
|
||||||
|
|
||||||
|
// 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?
|
||||||
|
static bool supports_on_spin_wait() { return false; }
|
||||||
|
|
||||||
|
// Does platform support fast class initialization checks for static methods?
|
||||||
|
static bool supports_fast_class_init_checks() { return false; }
|
||||||
|
|
||||||
|
static bool print_matching_lines_from_file(const char* filename, outputStream* st, const char* keywords_to_match[]);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SHARE_RUNTIME_ABSTRACT_VM_VERSION_HPP
|
|
@ -25,275 +25,8 @@
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "logging/log.hpp"
|
#include "logging/log.hpp"
|
||||||
#include "logging/logStream.hpp"
|
#include "logging/logStream.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
|
||||||
#include "runtime/arguments.hpp"
|
|
||||||
#include "runtime/vm_version.hpp"
|
#include "runtime/vm_version.hpp"
|
||||||
|
|
||||||
const char* Abstract_VM_Version::_s_vm_release = Abstract_VM_Version::vm_release();
|
|
||||||
const char* Abstract_VM_Version::_s_internal_vm_info_string = Abstract_VM_Version::internal_vm_info_string();
|
|
||||||
|
|
||||||
uint64_t Abstract_VM_Version::_features = 0;
|
|
||||||
const char* Abstract_VM_Version::_features_string = "";
|
|
||||||
|
|
||||||
bool Abstract_VM_Version::_supports_cx8 = false;
|
|
||||||
bool Abstract_VM_Version::_supports_atomic_getset4 = false;
|
|
||||||
bool Abstract_VM_Version::_supports_atomic_getset8 = false;
|
|
||||||
bool Abstract_VM_Version::_supports_atomic_getadd4 = false;
|
|
||||||
bool Abstract_VM_Version::_supports_atomic_getadd8 = false;
|
|
||||||
unsigned int Abstract_VM_Version::_logical_processors_per_package = 1U;
|
|
||||||
unsigned int Abstract_VM_Version::_L1_data_cache_line_size = 0;
|
|
||||||
unsigned int Abstract_VM_Version::_data_cache_line_flush_size = 0;
|
|
||||||
|
|
||||||
VirtualizationType Abstract_VM_Version::_detected_virtualization = NoDetectedVirtualization;
|
|
||||||
|
|
||||||
#ifndef HOTSPOT_VERSION_STRING
|
|
||||||
#error HOTSPOT_VERSION_STRING must be defined
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef VERSION_FEATURE
|
|
||||||
#error VERSION_FEATURE must be defined
|
|
||||||
#endif
|
|
||||||
#ifndef VERSION_INTERIM
|
|
||||||
#error VERSION_INTERIM must be defined
|
|
||||||
#endif
|
|
||||||
#ifndef VERSION_UPDATE
|
|
||||||
#error VERSION_UPDATE must be defined
|
|
||||||
#endif
|
|
||||||
#ifndef VERSION_PATCH
|
|
||||||
#error VERSION_PATCH must be defined
|
|
||||||
#endif
|
|
||||||
#ifndef VERSION_BUILD
|
|
||||||
#error VERSION_BUILD must be defined
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef VERSION_STRING
|
|
||||||
#error VERSION_STRING must be defined
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef DEBUG_LEVEL
|
|
||||||
#error DEBUG_LEVEL must be defined
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define VM_RELEASE HOTSPOT_VERSION_STRING
|
|
||||||
|
|
||||||
// HOTSPOT_VERSION_STRING equals the JDK VERSION_STRING (unless overridden
|
|
||||||
// in a standalone build).
|
|
||||||
int Abstract_VM_Version::_vm_major_version = VERSION_FEATURE;
|
|
||||||
int Abstract_VM_Version::_vm_minor_version = VERSION_INTERIM;
|
|
||||||
int Abstract_VM_Version::_vm_security_version = VERSION_UPDATE;
|
|
||||||
int Abstract_VM_Version::_vm_patch_version = VERSION_PATCH;
|
|
||||||
int Abstract_VM_Version::_vm_build_number = VERSION_BUILD;
|
|
||||||
|
|
||||||
#if defined(_LP64)
|
|
||||||
#define VMLP "64-Bit "
|
|
||||||
#else
|
|
||||||
#define VMLP ""
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef VMTYPE
|
|
||||||
#ifdef TIERED
|
|
||||||
#define VMTYPE "Server"
|
|
||||||
#else // TIERED
|
|
||||||
#ifdef ZERO
|
|
||||||
#define VMTYPE "Zero"
|
|
||||||
#else // ZERO
|
|
||||||
#define VMTYPE COMPILER1_PRESENT("Client") \
|
|
||||||
COMPILER2_PRESENT("Server")
|
|
||||||
#endif // ZERO
|
|
||||||
#endif // TIERED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HOTSPOT_VM_DISTRO
|
|
||||||
#error HOTSPOT_VM_DISTRO must be defined
|
|
||||||
#endif
|
|
||||||
#define VMNAME HOTSPOT_VM_DISTRO " " VMLP VMTYPE " VM"
|
|
||||||
|
|
||||||
const char* Abstract_VM_Version::vm_name() {
|
|
||||||
return VMNAME;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const char* Abstract_VM_Version::vm_vendor() {
|
|
||||||
#ifdef VENDOR
|
|
||||||
return VENDOR;
|
|
||||||
#else
|
|
||||||
return "Oracle Corporation";
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const char* Abstract_VM_Version::vm_info_string() {
|
|
||||||
switch (Arguments::mode()) {
|
|
||||||
case Arguments::_int:
|
|
||||||
return UseSharedSpaces ? "interpreted mode, sharing" : "interpreted mode";
|
|
||||||
case Arguments::_mixed:
|
|
||||||
if (UseSharedSpaces) {
|
|
||||||
if (UseAOT) {
|
|
||||||
return "mixed mode, aot, sharing";
|
|
||||||
#ifdef TIERED
|
|
||||||
} else if(is_client_compilation_mode_vm()) {
|
|
||||||
return "mixed mode, emulated-client, sharing";
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
return "mixed mode, sharing";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (UseAOT) {
|
|
||||||
return "mixed mode, aot";
|
|
||||||
#ifdef TIERED
|
|
||||||
} else if(is_client_compilation_mode_vm()) {
|
|
||||||
return "mixed mode, emulated-client";
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
return "mixed mode";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case Arguments::_comp:
|
|
||||||
#ifdef TIERED
|
|
||||||
if (is_client_compilation_mode_vm()) {
|
|
||||||
return UseSharedSpaces ? "compiled mode, emulated-client, sharing" : "compiled mode, emulated-client";
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return UseSharedSpaces ? "compiled mode, sharing" : "compiled mode";
|
|
||||||
};
|
|
||||||
ShouldNotReachHere();
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
// NOTE: do *not* use stringStream. this function is called by
|
|
||||||
// fatal error handlers. if the crash is in native thread,
|
|
||||||
// stringStream cannot get resource allocated and will SEGV.
|
|
||||||
const char* Abstract_VM_Version::jre_release_version() {
|
|
||||||
return VERSION_STRING;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define OS LINUX_ONLY("linux") \
|
|
||||||
WINDOWS_ONLY("windows") \
|
|
||||||
SOLARIS_ONLY("solaris") \
|
|
||||||
AIX_ONLY("aix") \
|
|
||||||
BSD_ONLY("bsd")
|
|
||||||
|
|
||||||
#ifndef CPU
|
|
||||||
#ifdef ZERO
|
|
||||||
#define CPU ZERO_LIBARCH
|
|
||||||
#elif defined(PPC64)
|
|
||||||
#if defined(VM_LITTLE_ENDIAN)
|
|
||||||
#define CPU "ppc64le"
|
|
||||||
#else
|
|
||||||
#define CPU "ppc64"
|
|
||||||
#endif // PPC64
|
|
||||||
#else
|
|
||||||
#define CPU AARCH64_ONLY("aarch64") \
|
|
||||||
AMD64_ONLY("amd64") \
|
|
||||||
IA32_ONLY("x86") \
|
|
||||||
IA64_ONLY("ia64") \
|
|
||||||
S390_ONLY("s390") \
|
|
||||||
SPARC_ONLY("sparc")
|
|
||||||
#endif // !ZERO
|
|
||||||
#endif // !CPU
|
|
||||||
|
|
||||||
const char *Abstract_VM_Version::vm_platform_string() {
|
|
||||||
return OS "-" CPU;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 == 1600
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 10.0 (VS2010)"
|
|
||||||
#elif _MSC_VER == 1700
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 11.0 (VS2012)"
|
|
||||||
#elif _MSC_VER == 1800
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 12.0 (VS2013)"
|
|
||||||
#elif _MSC_VER == 1900
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 14.0 (VS2015)"
|
|
||||||
#elif _MSC_VER == 1911
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.3 (VS2017)"
|
|
||||||
#elif _MSC_VER == 1912
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.5 (VS2017)"
|
|
||||||
#elif _MSC_VER == 1913
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.6 (VS2017)"
|
|
||||||
#elif _MSC_VER == 1914
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.7 (VS2017)"
|
|
||||||
#elif _MSC_VER == 1915
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.8 (VS2017)"
|
|
||||||
#else
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "unknown MS VC++:" XSTR(_MSC_VER)
|
|
||||||
#endif
|
|
||||||
#elif defined(__SUNPRO_CC)
|
|
||||||
#if __SUNPRO_CC == 0x580
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "Workshop 5.8"
|
|
||||||
#elif __SUNPRO_CC == 0x590
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "Workshop 5.9"
|
|
||||||
#elif __SUNPRO_CC == 0x5100
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "Sun Studio 12u1"
|
|
||||||
#elif __SUNPRO_CC == 0x5120
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "Sun Studio 12u3"
|
|
||||||
#elif __SUNPRO_CC == 0x5130
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "Sun Studio 12u4"
|
|
||||||
#else
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "unknown Workshop:" XSTR(__SUNPRO_CC)
|
|
||||||
#endif
|
|
||||||
#elif defined(__clang_version__)
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "clang " __VERSION__
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "gcc " __VERSION__
|
|
||||||
#else
|
|
||||||
#define HOTSPOT_BUILD_COMPILER "unknown compiler"
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef FLOAT_ARCH
|
|
||||||
#if defined(__SOFTFP__)
|
|
||||||
#define FLOAT_ARCH_STR "-sflt"
|
|
||||||
#else
|
|
||||||
#define FLOAT_ARCH_STR ""
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define FLOAT_ARCH_STR XSTR(FLOAT_ARCH)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define INTERNAL_VERSION_SUFFIX VM_RELEASE ")" \
|
|
||||||
" for " OS "-" CPU FLOAT_ARCH_STR \
|
|
||||||
" JRE (" VERSION_STRING "), built on " __DATE__ " " __TIME__ \
|
|
||||||
" by " XSTR(HOTSPOT_BUILD_USER) " with " HOTSPOT_BUILD_COMPILER
|
|
||||||
|
|
||||||
return strcmp(DEBUG_LEVEL, "release") == 0
|
|
||||||
? VMNAME " (" INTERNAL_VERSION_SUFFIX
|
|
||||||
: VMNAME " (" DEBUG_LEVEL " " INTERNAL_VERSION_SUFFIX;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *Abstract_VM_Version::vm_build_user() {
|
|
||||||
return HOTSPOT_BUILD_USER;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *Abstract_VM_Version::jdk_debug_level() {
|
|
||||||
return DEBUG_LEVEL;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *Abstract_VM_Version::printable_jdk_debug_level() {
|
|
||||||
// Debug level is not printed for "release" builds
|
|
||||||
return strcmp(DEBUG_LEVEL, "release") == 0 ? "" : DEBUG_LEVEL " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int Abstract_VM_Version::jvm_version() {
|
|
||||||
return ((Abstract_VM_Version::vm_major_version() & 0xFF) << 24) |
|
|
||||||
((Abstract_VM_Version::vm_minor_version() & 0xFF) << 16) |
|
|
||||||
((Abstract_VM_Version::vm_security_version() & 0xFF) << 8) |
|
|
||||||
(Abstract_VM_Version::vm_build_number() & 0xFF);
|
|
||||||
}
|
|
||||||
|
|
||||||
void VM_Version_init() {
|
void VM_Version_init() {
|
||||||
VM_Version::initialize();
|
VM_Version::initialize();
|
||||||
|
|
||||||
|
@ -304,27 +37,3 @@ void VM_Version_init() {
|
||||||
os::print_cpu_info(&ls, buf, sizeof(buf));
|
os::print_cpu_info(&ls, buf, sizeof(buf));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Abstract_VM_Version::print_matching_lines_from_file(const char* filename, outputStream* st, const char* keywords_to_match[]) {
|
|
||||||
char line[500];
|
|
||||||
FILE* fp = fopen(filename, "r");
|
|
||||||
if (fp == NULL) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
st->print_cr("Virtualization information:");
|
|
||||||
while (fgets(line, sizeof(line), fp) != NULL) {
|
|
||||||
int i = 0;
|
|
||||||
while (keywords_to_match[i] != NULL) {
|
|
||||||
if (strncmp(line, keywords_to_match[i], strlen(keywords_to_match[i])) == 0) {
|
|
||||||
st->print("%s", line);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose(fp);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,171 +25,7 @@
|
||||||
#ifndef SHARE_RUNTIME_VM_VERSION_HPP
|
#ifndef SHARE_RUNTIME_VM_VERSION_HPP
|
||||||
#define SHARE_RUNTIME_VM_VERSION_HPP
|
#define SHARE_RUNTIME_VM_VERSION_HPP
|
||||||
|
|
||||||
#include "memory/allocation.hpp"
|
#include "utilities/macros.hpp" // for CPU_HEADER() macro.
|
||||||
#include "utilities/ostream.hpp"
|
|
||||||
#include "utilities/macros.hpp"
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
NoDetectedVirtualization,
|
|
||||||
XenHVM,
|
|
||||||
KVM,
|
|
||||||
VMWare,
|
|
||||||
HyperV,
|
|
||||||
PowerVM, // on AIX or Linux ppc64(le)
|
|
||||||
PowerFullPartitionMode, // on Linux ppc64(le)
|
|
||||||
PowerKVM
|
|
||||||
} VirtualizationType;
|
|
||||||
|
|
||||||
// VM_Version provides information about the VM.
|
|
||||||
|
|
||||||
class Abstract_VM_Version: AllStatic {
|
|
||||||
friend class VMStructs;
|
|
||||||
friend class JVMCIVMStructs;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
static const char* _s_vm_release;
|
|
||||||
static const char* _s_internal_vm_info_string;
|
|
||||||
|
|
||||||
// CPU feature flags.
|
|
||||||
static uint64_t _features;
|
|
||||||
static const char* _features_string;
|
|
||||||
|
|
||||||
// These are set by machine-dependent initializations
|
|
||||||
static bool _supports_cx8;
|
|
||||||
static bool _supports_atomic_getset4;
|
|
||||||
static bool _supports_atomic_getset8;
|
|
||||||
static bool _supports_atomic_getadd4;
|
|
||||||
static bool _supports_atomic_getadd8;
|
|
||||||
static unsigned int _logical_processors_per_package;
|
|
||||||
static unsigned int _L1_data_cache_line_size;
|
|
||||||
static int _vm_major_version;
|
|
||||||
static int _vm_minor_version;
|
|
||||||
static int _vm_security_version;
|
|
||||||
static int _vm_patch_version;
|
|
||||||
static int _vm_build_number;
|
|
||||||
static unsigned int _data_cache_line_flush_size;
|
|
||||||
|
|
||||||
static VirtualizationType _detected_virtualization;
|
|
||||||
|
|
||||||
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.
|
|
||||||
static void 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().
|
|
||||||
static void 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().
|
|
||||||
static void init_before_ergo() {}
|
|
||||||
|
|
||||||
// Name
|
|
||||||
static const char* vm_name();
|
|
||||||
// Vendor
|
|
||||||
static const char* vm_vendor();
|
|
||||||
// VM version information string printed by launcher (java -version)
|
|
||||||
static const char* vm_info_string();
|
|
||||||
static const char* vm_release();
|
|
||||||
static const char* vm_platform_string();
|
|
||||||
static const char* vm_build_user();
|
|
||||||
|
|
||||||
static int vm_major_version() { return _vm_major_version; }
|
|
||||||
static int vm_minor_version() { return _vm_minor_version; }
|
|
||||||
static int vm_security_version() { return _vm_security_version; }
|
|
||||||
static int vm_patch_version() { return _vm_patch_version; }
|
|
||||||
static int vm_build_number() { return _vm_build_number; }
|
|
||||||
|
|
||||||
// Gets the jvm_version_info.jvm_version defined in jvm.h
|
|
||||||
static unsigned int jvm_version();
|
|
||||||
|
|
||||||
// Internal version providing additional build information
|
|
||||||
static const char* internal_vm_info_string();
|
|
||||||
static const char* jre_release_version();
|
|
||||||
static const char* jdk_debug_level();
|
|
||||||
static const char* printable_jdk_debug_level();
|
|
||||||
|
|
||||||
static uint64_t features() {
|
|
||||||
return _features;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char* features_string() {
|
|
||||||
return _features_string;
|
|
||||||
}
|
|
||||||
|
|
||||||
static VirtualizationType get_detected_virtualization() {
|
|
||||||
return _detected_virtualization;
|
|
||||||
}
|
|
||||||
|
|
||||||
// platforms that need to specialize this
|
|
||||||
// define VM_Version::print_platform_virtualization_info()
|
|
||||||
static void print_platform_virtualization_info(outputStream*) { }
|
|
||||||
|
|
||||||
// does HW support an 8-byte compare-exchange operation?
|
|
||||||
static bool supports_cx8() {
|
|
||||||
#ifdef SUPPORTS_NATIVE_CX8
|
|
||||||
return true;
|
|
||||||
#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
|
|
||||||
static bool supports_atomic_getset4() {return _supports_atomic_getset4;}
|
|
||||||
static bool supports_atomic_getset8() {return _supports_atomic_getset8;}
|
|
||||||
static bool supports_atomic_getadd4() {return _supports_atomic_getadd4;}
|
|
||||||
static bool supports_atomic_getadd8() {return _supports_atomic_getadd8;}
|
|
||||||
|
|
||||||
static unsigned int logical_processors_per_package() {
|
|
||||||
return _logical_processors_per_package;
|
|
||||||
}
|
|
||||||
|
|
||||||
static unsigned int L1_data_cache_line_size() {
|
|
||||||
return _L1_data_cache_line_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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
|
|
||||||
static unsigned int data_cache_line_flush_size() {
|
|
||||||
return _data_cache_line_flush_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
// returns true if and only if cache line writeback is supported
|
|
||||||
static bool supports_data_cache_line_flush() {
|
|
||||||
return _data_cache_line_flush_size != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ARCH specific policy for the BiasedLocking
|
|
||||||
static bool use_biased_locking() { return true; }
|
|
||||||
|
|
||||||
// Number of page sizes efficiently supported by the hardware. Most chips now
|
|
||||||
// support two sizes, thus this default implementation. Processor-specific
|
|
||||||
// subclasses should define new versions to hide this one as needed. Note
|
|
||||||
// that the O/S may support more sizes, but at most this many are used.
|
|
||||||
static uint page_size_count() { return 2; }
|
|
||||||
|
|
||||||
// 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?
|
|
||||||
static bool supports_on_spin_wait() { return false; }
|
|
||||||
|
|
||||||
// Does platform support fast class initialization checks for static methods?
|
|
||||||
static bool supports_fast_class_init_checks() { return false; }
|
|
||||||
|
|
||||||
static bool print_matching_lines_from_file(const char* filename, outputStream* st, const char* keywords_to_match[]);
|
|
||||||
};
|
|
||||||
|
|
||||||
#include CPU_HEADER(vm_version)
|
#include CPU_HEADER(vm_version)
|
||||||
|
|
||||||
#endif // SHARE_RUNTIME_VM_VERSION_HPP
|
#endif // SHARE_RUNTIME_VM_VERSION_HPP
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue