7041262: VM_Version should be called instead of Abstract_VM_Version so that overriding works
Change calls to Abstract_VM_Version methods to be calls to VM_Version methods. Reviewed-by: coleenp, kbarrett, dholmes
This commit is contained in:
parent
4fe37df932
commit
794d864feb
src/hotspot
cpu/arm
share
classfile
gc
prims
runtime
services
utilities
@ -318,20 +318,3 @@ bool VM_Version::use_biased_locking() {
|
||||
//
|
||||
return (!os::is_MP() && (arm_arch() > 5)) ? false : true;
|
||||
}
|
||||
|
||||
#define EXP
|
||||
|
||||
// Temporary override for experimental features
|
||||
// Copied from Abstract_VM_Version
|
||||
const char* VM_Version::vm_info_string() {
|
||||
switch (Arguments::mode()) {
|
||||
case Arguments::_int:
|
||||
return UseSharedSpaces ? "interpreted mode, sharing" EXP : "interpreted mode" EXP;
|
||||
case Arguments::_mixed:
|
||||
return UseSharedSpaces ? "mixed mode, sharing" EXP : "mixed mode" EXP;
|
||||
case Arguments::_comp:
|
||||
return UseSharedSpaces ? "compiled mode, sharing" EXP : "compiled mode" EXP;
|
||||
};
|
||||
ShouldNotReachHere();
|
||||
return "";
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ static const char* get_jimage_version_string() {
|
||||
static char version_string[10] = "";
|
||||
if (version_string[0] == '\0') {
|
||||
jio_snprintf(version_string, sizeof(version_string), "%d.%d",
|
||||
Abstract_VM_Version::vm_major_version(), Abstract_VM_Version::vm_minor_version());
|
||||
VM_Version::vm_major_version(), VM_Version::vm_minor_version());
|
||||
}
|
||||
return (const char*)version_string;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, Red Hat, Inc. and/or its affiliates.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -45,7 +46,7 @@ void CMSArguments::set_parnew_gc_flags() {
|
||||
assert(UseConcMarkSweepGC, "CMS is expected to be on here");
|
||||
|
||||
if (FLAG_IS_DEFAULT(ParallelGCThreads)) {
|
||||
FLAG_SET_DEFAULT(ParallelGCThreads, Abstract_VM_Version::parallel_worker_threads());
|
||||
FLAG_SET_DEFAULT(ParallelGCThreads, VM_Version::parallel_worker_threads());
|
||||
assert(ParallelGCThreads > 0, "We should always have at least one thread by default");
|
||||
} else if (ParallelGCThreads == 0) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
|
@ -75,7 +75,7 @@ void G1Arguments::parse_verification_type(const char* type) {
|
||||
void G1Arguments::initialize() {
|
||||
GCArguments::initialize();
|
||||
assert(UseG1GC, "Error");
|
||||
FLAG_SET_DEFAULT(ParallelGCThreads, Abstract_VM_Version::parallel_worker_threads());
|
||||
FLAG_SET_DEFAULT(ParallelGCThreads, VM_Version::parallel_worker_threads());
|
||||
if (ParallelGCThreads == 0) {
|
||||
assert(!FLAG_IS_DEFAULT(ParallelGCThreads), "The default value for ParallelGCThreads should not be 0.");
|
||||
vm_exit_during_initialization("The flag -XX:+UseG1GC can not be combined with -XX:ParallelGCThreads=0", NULL);
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, Red Hat, Inc. and/or its affiliates.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -50,7 +51,7 @@ void ParallelArguments::initialize() {
|
||||
// If no heap maximum was requested explicitly, use some reasonable fraction
|
||||
// of the physical memory, up to a maximum of 1GB.
|
||||
FLAG_SET_DEFAULT(ParallelGCThreads,
|
||||
Abstract_VM_Version::parallel_worker_threads());
|
||||
VM_Version::parallel_worker_threads());
|
||||
if (ParallelGCThreads == 0) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
"The Parallel GC can not be combined with -XX:ParallelGCThreads=0\n");
|
||||
|
@ -38,8 +38,8 @@
|
||||
ZInitialize::ZInitialize(ZBarrierSet* barrier_set) {
|
||||
log_info(gc, init)("Initializing %s", ZGCName);
|
||||
log_info(gc, init)("Version: %s (%s)",
|
||||
Abstract_VM_Version::vm_release(),
|
||||
Abstract_VM_Version::jdk_debug_level());
|
||||
VM_Version::vm_release(),
|
||||
VM_Version::jdk_debug_level());
|
||||
|
||||
// Early initialization
|
||||
ZAddressMasks::initialize();
|
||||
|
@ -3736,8 +3736,8 @@ JVM_ENTRY(void, JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t i
|
||||
{
|
||||
memset(info, 0, info_size);
|
||||
|
||||
info->jvm_version = Abstract_VM_Version::jvm_version();
|
||||
info->patch_version = Abstract_VM_Version::vm_patch_version();
|
||||
info->jvm_version = VM_Version::jvm_version();
|
||||
info->patch_version = VM_Version::vm_patch_version();
|
||||
|
||||
// when we add a new capability in the jvm_version_info struct, we should also
|
||||
// consider to expose this new capability in the sun.rt.jvmCapabilities jvmstat
|
||||
|
@ -4569,9 +4569,9 @@ void Threads::print_on(outputStream* st, bool print_stacks,
|
||||
st->print_raw_cr(os::local_time_string(buf, sizeof(buf)));
|
||||
|
||||
st->print_cr("Full thread dump %s (%s %s):",
|
||||
Abstract_VM_Version::vm_name(),
|
||||
Abstract_VM_Version::vm_release(),
|
||||
Abstract_VM_Version::vm_info_string());
|
||||
VM_Version::vm_name(),
|
||||
VM_Version::vm_release(),
|
||||
VM_Version::vm_info_string());
|
||||
st->cr();
|
||||
|
||||
#if INCLUDE_SERVICES
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
@ -69,7 +69,7 @@ class Abstract_VM_Version: AllStatic {
|
||||
// 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();
|
||||
static void initialize() { }
|
||||
|
||||
// This allows for early initialization of VM_Version information
|
||||
// that may be needed later in the initialization sequence but before
|
||||
|
@ -213,8 +213,8 @@ int HelpDCmd::num_arguments() {
|
||||
}
|
||||
|
||||
void VersionDCmd::execute(DCmdSource source, TRAPS) {
|
||||
output()->print_cr("%s version %s", Abstract_VM_Version::vm_name(),
|
||||
Abstract_VM_Version::vm_release());
|
||||
output()->print_cr("%s version %s", VM_Version::vm_name(),
|
||||
VM_Version::vm_release());
|
||||
JDK_Version jdk_version = JDK_Version::current();
|
||||
if (jdk_version.patch_version() > 0) {
|
||||
output()->print_cr("JDK %d.%d.%d.%d", jdk_version.major_version(),
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, 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
|
||||
@ -66,7 +66,7 @@ void RuntimeService::init() {
|
||||
|
||||
// create performance counters for jvm_version and its capabilities
|
||||
PerfDataManager::create_constant(SUN_RT, "jvmVersion", PerfData::U_None,
|
||||
(jlong) Abstract_VM_Version::jvm_version(), CHECK);
|
||||
(jlong) VM_Version::jvm_version(), CHECK);
|
||||
|
||||
// The capabilities counter is a binary representation of the VM capabilities in string.
|
||||
// This string respresentation simplifies the implementation of the client side
|
||||
|
@ -319,18 +319,18 @@ static void report_vm_version(outputStream* st, char* buf, int buflen) {
|
||||
JDK_Version::runtime_name() : "";
|
||||
const char* runtime_version = JDK_Version::runtime_version() != NULL ?
|
||||
JDK_Version::runtime_version() : "";
|
||||
const char* jdk_debug_level = Abstract_VM_Version::printable_jdk_debug_level() != NULL ?
|
||||
Abstract_VM_Version::printable_jdk_debug_level() : "";
|
||||
const char* jdk_debug_level = VM_Version::printable_jdk_debug_level() != NULL ?
|
||||
VM_Version::printable_jdk_debug_level() : "";
|
||||
|
||||
st->print_cr("# JRE version: %s (%s) (%sbuild %s)", runtime_name, buf,
|
||||
jdk_debug_level, runtime_version);
|
||||
|
||||
// This is the long version with some default settings added
|
||||
st->print_cr("# Java VM: %s (%s%s, %s%s%s%s%s, %s, %s)",
|
||||
Abstract_VM_Version::vm_name(),
|
||||
VM_Version::vm_name(),
|
||||
jdk_debug_level,
|
||||
Abstract_VM_Version::vm_release(),
|
||||
Abstract_VM_Version::vm_info_string(),
|
||||
VM_Version::vm_release(),
|
||||
VM_Version::vm_info_string(),
|
||||
TieredCompilation ? ", tiered" : "",
|
||||
#if INCLUDE_JVMCI
|
||||
EnableJVMCI ? ", jvmci" : "",
|
||||
@ -340,7 +340,7 @@ static void report_vm_version(outputStream* st, char* buf, int buflen) {
|
||||
#endif
|
||||
UseCompressedOops ? ", compressed oops" : "",
|
||||
GCConfig::hs_err_name(),
|
||||
Abstract_VM_Version::vm_platform_string()
|
||||
VM_Version::vm_platform_string()
|
||||
);
|
||||
}
|
||||
|
||||
@ -1007,7 +1007,7 @@ void VMError::report(outputStream* st, bool _verbose) {
|
||||
STEP("printing internal vm info")
|
||||
|
||||
if (_verbose) {
|
||||
st->print_cr("vm_info: %s", Abstract_VM_Version::internal_vm_info_string());
|
||||
st->print_cr("vm_info: %s", VM_Version::internal_vm_info_string());
|
||||
st->cr();
|
||||
}
|
||||
|
||||
@ -1170,7 +1170,7 @@ void VMError::print_vm_info(outputStream* st) {
|
||||
|
||||
// STEP("printing internal vm info")
|
||||
|
||||
st->print_cr("vm_info: %s", Abstract_VM_Version::internal_vm_info_string());
|
||||
st->print_cr("vm_info: %s", VM_Version::internal_vm_info_string());
|
||||
st->cr();
|
||||
|
||||
// print a defined marker to show that error handling finished correctly.
|
||||
|
Loading…
x
Reference in New Issue
Block a user