8282986: Remove "system" in boot class path names

Reviewed-by: iklam, dholmes
This commit is contained in:
Coleen Phillimore 2022-07-07 15:27:55 +00:00
parent 74ca6ca25b
commit 8e7b45b820
6 changed files with 25 additions and 25 deletions

View File

@ -866,7 +866,7 @@ bool FileMapInfo::validate_boot_class_paths() {
// time path (e.g. the JDK image is copied to a different location
// after generating the shared archive), which is acceptable. For most
// common cases, the dump time boot path might contain modules_image only.
char* runtime_boot_path = Arguments::get_sysclasspath();
char* runtime_boot_path = Arguments::get_boot_class_path();
char* rp = skip_first_path_entry(runtime_boot_path);
assert(shared_path(0)->is_modules_image(), "first shared_path must be the modules image");
int dp_len = header()->app_class_paths_start_index() - 1; // ignore the first path to the module image

View File

@ -507,15 +507,15 @@ void ClassLoader::trace_class_path(const char* msg, const char* name) {
}
void ClassLoader::setup_bootstrap_search_path(JavaThread* current) {
const char* sys_class_path = Arguments::get_sysclasspath();
assert(sys_class_path != NULL, "System boot class path must not be NULL");
const char* bootcp = Arguments::get_boot_class_path();
assert(bootcp != NULL, "Boot class path must not be NULL");
if (PrintSharedArchiveAndExit) {
// Don't print sys_class_path - this is the bootcp of this current VM process, not necessarily
// the same as the bootcp of the shared archive.
// Don't print bootcp - this is the bootcp of this current VM process, not necessarily
// the same as the boot classpath of the shared archive.
} else {
trace_class_path("bootstrap loader class path=", sys_class_path);
trace_class_path("bootstrap loader class path=", bootcp);
}
setup_bootstrap_search_path_impl(current, sys_class_path);
setup_bootstrap_search_path_impl(current, bootcp);
}
#if INCLUDE_CDS
@ -673,7 +673,7 @@ void ClassLoader::setup_bootstrap_search_path_impl(JavaThread* current, const ch
}
set_base_piece = false;
} else {
// Every entry on the system boot class path after the initial base piece,
// Every entry on the boot class path after the initial base piece,
// which is set by os::set_boot_path(), is considered an appended entry.
update_class_path_entry_list(current, path, false, true, false);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 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
@ -447,7 +447,7 @@ void Modules::define_module(Handle module, jboolean is_open, jstring version,
}
// If the module is defined to the boot loader and an exploded build is being
// used, prepend <java.home>/modules/modules_name to the system boot class path.
// used, prepend <java.home>/modules/modules_name to the boot class path.
if (h_loader.is_null() && !ClassLoader::has_jrt_entry()) {
ClassLoader::add_to_exploded_build_list(THREAD, module_symbol);
}

View File

@ -117,7 +117,7 @@ SystemProperty *Arguments::_jdk_boot_class_path_append = NULL;
SystemProperty *Arguments::_vm_info = NULL;
GrowableArray<ModulePatchPath*> *Arguments::_patch_mod_prefix = NULL;
PathString *Arguments::_system_boot_class_path = NULL;
PathString *Arguments::_boot_class_path = NULL;
bool Arguments::_has_jimage = false;
char* Arguments::_ext_dirs = NULL;
@ -389,10 +389,10 @@ void Arguments::process_sun_java_launcher_properties(JavaVMInitArgs* args) {
// Initialize system properties key and value.
void Arguments::init_system_properties() {
// Set up _system_boot_class_path which is not a property but
// Set up _boot_class_path which is not a property but
// relies heavily on argument processing and the jdk.boot.class.path.append
// property. It is used to store the underlying system boot class path.
_system_boot_class_path = new PathString(NULL);
// property. It is used to store the underlying boot class path.
_boot_class_path = new PathString(NULL);
PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.name",
"Java Virtual Machine Specification", false));

View File

@ -62,7 +62,7 @@ struct LegacyGCLogging {
// PathString is used as:
// - the underlying value for a SystemProperty
// - the path portion of an --patch-module module/path pair
// - the string that represents the system boot class path, Arguments::_system_boot_class_path.
// - the string that represents the boot class path, Arguments::_boot_class_path.
class PathString : public CHeapObj<mtArguments> {
protected:
char* _value;
@ -305,10 +305,10 @@ class Arguments : AllStatic {
// calls to AddToBootstrapClassLoaderSearch. This is the
// final form before ClassLoader::setup_bootstrap_search().
// Note: since --patch-module is a module name/path pair, the
// system boot class path string no longer contains the "prefix"
// boot class path string no longer contains the "prefix"
// to the boot class path base piece as it did when
// -Xbootclasspath/p was supported.
static PathString *_system_boot_class_path;
static PathString* _boot_class_path;
// Set if a modular java runtime image is present vs. a build with exploded modules
static bool _has_jimage;
@ -599,21 +599,21 @@ class Arguments : AllStatic {
static void set_library_path(const char *value) { _java_library_path->set_value(value); }
static void set_ext_dirs(char *value) { _ext_dirs = os::strdup_check_oom(value); }
// Set up the underlying pieces of the system boot class path
// Set up the underlying pieces of the boot class path
static void add_patch_mod_prefix(const char *module_name, const char *path, bool* patch_mod_javabase);
static void set_sysclasspath(const char *value, bool has_jimage) {
static void set_boot_class_path(const char *value, bool has_jimage) {
// During start up, set by os::set_boot_path()
assert(get_sysclasspath() == NULL, "System boot class path previously set");
_system_boot_class_path->set_value(value);
assert(get_boot_class_path() == NULL, "Boot class path previously set");
_boot_class_path->set_value(value);
_has_jimage = has_jimage;
}
static void append_sysclasspath(const char *value) {
_system_boot_class_path->append_value(value);
_boot_class_path->append_value(value);
_jdk_boot_class_path_append->append_value(value);
}
static GrowableArray<ModulePatchPath*>* get_patch_mod_prefix() { return _patch_mod_prefix; }
static char* get_sysclasspath() { return _system_boot_class_path->value(); }
static char* get_boot_class_path() { return _boot_class_path->value(); }
static char* get_jdk_boot_class_path_append() { return _jdk_boot_class_path_append->value(); }
static bool has_jimage() { return _has_jimage; }

View File

@ -1297,7 +1297,7 @@ bool os::set_boot_path(char fileSep, char pathSep) {
if (jimage == NULL) return false;
bool has_jimage = (os::stat(jimage, &st) == 0);
if (has_jimage) {
Arguments::set_sysclasspath(jimage, true);
Arguments::set_boot_class_path(jimage, true);
FREE_C_HEAP_ARRAY(char, jimage);
return true;
}
@ -1307,7 +1307,7 @@ bool os::set_boot_path(char fileSep, char pathSep) {
char* base_classes = format_boot_path("%/modules/" JAVA_BASE_NAME, home, home_len, fileSep, pathSep);
if (base_classes == NULL) return false;
if (os::stat(base_classes, &st) == 0) {
Arguments::set_sysclasspath(base_classes, false);
Arguments::set_boot_class_path(base_classes, false);
FREE_C_HEAP_ARRAY(char, base_classes);
return true;
}