提交 71d63249 编写于 作者: D dcubed

8005044: remove crufty '_g' support from HS runtime code

Summary: Phase 2 is removing '_g' support from the Runtime code.
Reviewed-by: dcubed, coleenp, hseigel
Contributed-by: ron.durbin@oracle.com
上级 4dcda36e
...@@ -298,12 +298,12 @@ void os::init_system_properties_values() { ...@@ -298,12 +298,12 @@ void os::init_system_properties_values() {
// The next steps are taken in the product version: // The next steps are taken in the product version:
// //
// Obtain the JAVA_HOME value from the location of libjvm[_g].so. // Obtain the JAVA_HOME value from the location of libjvm.so.
// This library should be located at: // This library should be located at:
// <JAVA_HOME>/jre/lib/<arch>/{client|server}/libjvm[_g].so. // <JAVA_HOME>/jre/lib/<arch>/{client|server}/libjvm.so.
// //
// If "/jre/lib/" appears at the right place in the path, then we // If "/jre/lib/" appears at the right place in the path, then we
// assume libjvm[_g].so is installed in a JDK and we use this path. // assume libjvm.so is installed in a JDK and we use this path.
// //
// Otherwise exit with message: "Could not create the Java virtual machine." // Otherwise exit with message: "Could not create the Java virtual machine."
// //
...@@ -313,9 +313,9 @@ void os::init_system_properties_values() { ...@@ -313,9 +313,9 @@ void os::init_system_properties_values() {
// instead of exit check for $JAVA_HOME environment variable. // instead of exit check for $JAVA_HOME environment variable.
// //
// If it is defined and we are able to locate $JAVA_HOME/jre/lib/<arch>, // If it is defined and we are able to locate $JAVA_HOME/jre/lib/<arch>,
// then we append a fake suffix "hotspot/libjvm[_g].so" to this path so // then we append a fake suffix "hotspot/libjvm.so" to this path so
// it looks like libjvm[_g].so is installed there // it looks like libjvm.so is installed there
// <JAVA_HOME>/jre/lib/<arch>/hotspot/libjvm[_g].so. // <JAVA_HOME>/jre/lib/<arch>/hotspot/libjvm.so.
// //
// Otherwise exit. // Otherwise exit.
// //
...@@ -1228,7 +1228,7 @@ const char* os::get_current_directory(char *buf, int buflen) { ...@@ -1228,7 +1228,7 @@ const char* os::get_current_directory(char *buf, int buflen) {
return getcwd(buf, buflen); return getcwd(buf, buflen);
} }
// check if addr is inside libjvm[_g].so // check if addr is inside libjvm.so
bool os::address_is_in_vm(address addr) { bool os::address_is_in_vm(address addr) {
static address libjvm_base_addr; static address libjvm_base_addr;
Dl_info dlinfo; Dl_info dlinfo;
...@@ -1689,7 +1689,7 @@ void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) { ...@@ -1689,7 +1689,7 @@ void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) {
static char saved_jvm_path[MAXPATHLEN] = {0}; static char saved_jvm_path[MAXPATHLEN] = {0};
// Find the full path to the current module, libjvm or libjvm_g // Find the full path to the current module, libjvm
void os::jvm_path(char *buf, jint buflen) { void os::jvm_path(char *buf, jint buflen) {
// Error checking. // Error checking.
if (buflen < MAXPATHLEN) { if (buflen < MAXPATHLEN) {
...@@ -1732,10 +1732,9 @@ void os::jvm_path(char *buf, jint buflen) { ...@@ -1732,10 +1732,9 @@ void os::jvm_path(char *buf, jint buflen) {
char* jrelib_p; char* jrelib_p;
int len; int len;
// Check the current module name "libjvm" or "libjvm_g". // Check the current module name "libjvm"
p = strrchr(buf, '/'); p = strrchr(buf, '/');
assert(strstr(p, "/libjvm") == p, "invalid library name"); assert(strstr(p, "/libjvm") == p, "invalid library name");
p = strstr(p, "_g") ? "_g" : "";
rp = realpath(java_home_var, buf); rp = realpath(java_home_var, buf);
if (rp == NULL) if (rp == NULL)
...@@ -1764,11 +1763,9 @@ void os::jvm_path(char *buf, jint buflen) { ...@@ -1764,11 +1763,9 @@ void os::jvm_path(char *buf, jint buflen) {
// to complete the path to JVM being overridden. Otherwise fallback // to complete the path to JVM being overridden. Otherwise fallback
// to the path to the current library. // to the path to the current library.
if (0 == access(buf, F_OK)) { if (0 == access(buf, F_OK)) {
// Use current module name "libjvm[_g]" instead of // Use current module name "libjvm"
// "libjvm"debug_only("_g")"" since for fastdebug version
// we should have "libjvm" but debug_only("_g") adds "_g"!
len = strlen(buf); len = strlen(buf);
snprintf(buf + len, buflen-len, "/libjvm%s%s", p, JNI_LIB_SUFFIX); snprintf(buf + len, buflen-len, "/libjvm%s", JNI_LIB_SUFFIX);
} else { } else {
// Fall back to path of current library // Fall back to path of current library
rp = realpath(dli_fname, buf); rp = realpath(dli_fname, buf);
......
...@@ -321,12 +321,12 @@ void os::init_system_properties_values() { ...@@ -321,12 +321,12 @@ void os::init_system_properties_values() {
// The next steps are taken in the product version: // The next steps are taken in the product version:
// //
// Obtain the JAVA_HOME value from the location of libjvm[_g].so. // Obtain the JAVA_HOME value from the location of libjvm.so.
// This library should be located at: // This library should be located at:
// <JAVA_HOME>/jre/lib/<arch>/{client|server}/libjvm[_g].so. // <JAVA_HOME>/jre/lib/<arch>/{client|server}/libjvm.so.
// //
// If "/jre/lib/" appears at the right place in the path, then we // If "/jre/lib/" appears at the right place in the path, then we
// assume libjvm[_g].so is installed in a JDK and we use this path. // assume libjvm.so is installed in a JDK and we use this path.
// //
// Otherwise exit with message: "Could not create the Java virtual machine." // Otherwise exit with message: "Could not create the Java virtual machine."
// //
...@@ -336,9 +336,9 @@ void os::init_system_properties_values() { ...@@ -336,9 +336,9 @@ void os::init_system_properties_values() {
// instead of exit check for $JAVA_HOME environment variable. // instead of exit check for $JAVA_HOME environment variable.
// //
// If it is defined and we are able to locate $JAVA_HOME/jre/lib/<arch>, // If it is defined and we are able to locate $JAVA_HOME/jre/lib/<arch>,
// then we append a fake suffix "hotspot/libjvm[_g].so" to this path so // then we append a fake suffix "hotspot/libjvm.so" to this path so
// it looks like libjvm[_g].so is installed there // it looks like libjvm.so is installed there
// <JAVA_HOME>/jre/lib/<arch>/hotspot/libjvm[_g].so. // <JAVA_HOME>/jre/lib/<arch>/hotspot/libjvm.so.
// //
// Otherwise exit. // Otherwise exit.
// //
...@@ -1679,7 +1679,7 @@ const char* os::get_current_directory(char *buf, int buflen) { ...@@ -1679,7 +1679,7 @@ const char* os::get_current_directory(char *buf, int buflen) {
return getcwd(buf, buflen); return getcwd(buf, buflen);
} }
// check if addr is inside libjvm[_g].so // check if addr is inside libjvm.so
bool os::address_is_in_vm(address addr) { bool os::address_is_in_vm(address addr) {
static address libjvm_base_addr; static address libjvm_base_addr;
Dl_info dlinfo; Dl_info dlinfo;
...@@ -2180,7 +2180,7 @@ void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) { ...@@ -2180,7 +2180,7 @@ void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) {
static char saved_jvm_path[MAXPATHLEN] = {0}; static char saved_jvm_path[MAXPATHLEN] = {0};
// Find the full path to the current module, libjvm.so or libjvm_g.so // Find the full path to the current module, libjvm.so
void os::jvm_path(char *buf, jint buflen) { void os::jvm_path(char *buf, jint buflen) {
// Error checking. // Error checking.
if (buflen < MAXPATHLEN) { if (buflen < MAXPATHLEN) {
...@@ -2223,10 +2223,9 @@ void os::jvm_path(char *buf, jint buflen) { ...@@ -2223,10 +2223,9 @@ void os::jvm_path(char *buf, jint buflen) {
char* jrelib_p; char* jrelib_p;
int len; int len;
// Check the current module name "libjvm.so" or "libjvm_g.so". // Check the current module name "libjvm.so".
p = strrchr(buf, '/'); p = strrchr(buf, '/');
assert(strstr(p, "/libjvm") == p, "invalid library name"); assert(strstr(p, "/libjvm") == p, "invalid library name");
p = strstr(p, "_g") ? "_g" : "";
rp = realpath(java_home_var, buf); rp = realpath(java_home_var, buf);
if (rp == NULL) if (rp == NULL)
...@@ -2242,11 +2241,9 @@ void os::jvm_path(char *buf, jint buflen) { ...@@ -2242,11 +2241,9 @@ void os::jvm_path(char *buf, jint buflen) {
} }
if (0 == access(buf, F_OK)) { if (0 == access(buf, F_OK)) {
// Use current module name "libjvm[_g].so" instead of // Use current module name "libjvm.so"
// "libjvm"debug_only("_g")".so" since for fastdebug version
// we should have "libjvm.so" but debug_only("_g") adds "_g"!
len = strlen(buf); len = strlen(buf);
snprintf(buf + len, buflen-len, "/hotspot/libjvm%s.so", p); snprintf(buf + len, buflen-len, "/hotspot/libjvm.so");
} else { } else {
// Go back to path of .so // Go back to path of .so
rp = realpath(dli_fname, buf); rp = realpath(dli_fname, buf);
......
...@@ -734,12 +734,12 @@ void os::init_system_properties_values() { ...@@ -734,12 +734,12 @@ void os::init_system_properties_values() {
// The next steps are taken in the product version: // The next steps are taken in the product version:
// //
// Obtain the JAVA_HOME value from the location of libjvm[_g].so. // Obtain the JAVA_HOME value from the location of libjvm.so.
// This library should be located at: // This library should be located at:
// <JAVA_HOME>/jre/lib/<arch>/{client|server}/libjvm[_g].so. // <JAVA_HOME>/jre/lib/<arch>/{client|server}/libjvm.so.
// //
// If "/jre/lib/" appears at the right place in the path, then we // If "/jre/lib/" appears at the right place in the path, then we
// assume libjvm[_g].so is installed in a JDK and we use this path. // assume libjvm.so is installed in a JDK and we use this path.
// //
// Otherwise exit with message: "Could not create the Java virtual machine." // Otherwise exit with message: "Could not create the Java virtual machine."
// //
...@@ -749,9 +749,9 @@ void os::init_system_properties_values() { ...@@ -749,9 +749,9 @@ void os::init_system_properties_values() {
// instead of exit check for $JAVA_HOME environment variable. // instead of exit check for $JAVA_HOME environment variable.
// //
// If it is defined and we are able to locate $JAVA_HOME/jre/lib/<arch>, // If it is defined and we are able to locate $JAVA_HOME/jre/lib/<arch>,
// then we append a fake suffix "hotspot/libjvm[_g].so" to this path so // then we append a fake suffix "hotspot/libjvm.so" to this path so
// it looks like libjvm[_g].so is installed there // it looks like libjvm.so is installed there
// <JAVA_HOME>/jre/lib/<arch>/hotspot/libjvm[_g].so. // <JAVA_HOME>/jre/lib/<arch>/hotspot/libjvm.so.
// //
// Otherwise exit. // Otherwise exit.
// //
...@@ -1934,7 +1934,7 @@ const char* os::get_current_directory(char *buf, int buflen) { ...@@ -1934,7 +1934,7 @@ const char* os::get_current_directory(char *buf, int buflen) {
return getcwd(buf, buflen); return getcwd(buf, buflen);
} }
// check if addr is inside libjvm[_g].so // check if addr is inside libjvm.so
bool os::address_is_in_vm(address addr) { bool os::address_is_in_vm(address addr) {
static address libjvm_base_addr; static address libjvm_base_addr;
Dl_info dlinfo; Dl_info dlinfo;
...@@ -2474,7 +2474,7 @@ void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) { ...@@ -2474,7 +2474,7 @@ void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) {
static char saved_jvm_path[MAXPATHLEN] = { 0 }; static char saved_jvm_path[MAXPATHLEN] = { 0 };
// Find the full path to the current module, libjvm.so or libjvm_g.so // Find the full path to the current module, libjvm.so
void os::jvm_path(char *buf, jint buflen) { void os::jvm_path(char *buf, jint buflen) {
// Error checking. // Error checking.
if (buflen < MAXPATHLEN) { if (buflen < MAXPATHLEN) {
...@@ -2522,10 +2522,9 @@ void os::jvm_path(char *buf, jint buflen) { ...@@ -2522,10 +2522,9 @@ void os::jvm_path(char *buf, jint buflen) {
strcpy(cpu_arch, "amd64"); strcpy(cpu_arch, "amd64");
} }
#endif #endif
// Check the current module name "libjvm.so" or "libjvm_g.so". // Check the current module name "libjvm.so".
p = strrchr(buf, '/'); p = strrchr(buf, '/');
assert(strstr(p, "/libjvm") == p, "invalid library name"); assert(strstr(p, "/libjvm") == p, "invalid library name");
p = strstr(p, "_g") ? "_g" : "";
realpath(java_home_var, buf); realpath(java_home_var, buf);
// determine if this is a legacy image or modules image // determine if this is a legacy image or modules image
...@@ -2538,11 +2537,9 @@ void os::jvm_path(char *buf, jint buflen) { ...@@ -2538,11 +2537,9 @@ void os::jvm_path(char *buf, jint buflen) {
} }
if (0 == access(buf, F_OK)) { if (0 == access(buf, F_OK)) {
// Use current module name "libjvm[_g].so" instead of // Use current module name "libjvm.so"
// "libjvm"debug_only("_g")".so" since for fastdebug version
// we should have "libjvm.so" but debug_only("_g") adds "_g"!
len = strlen(buf); len = strlen(buf);
snprintf(buf + len, buflen-len, "/hotspot/libjvm%s.so", p); snprintf(buf + len, buflen-len, "/hotspot/libjvm.so");
} else { } else {
// Go back to path of .so // Go back to path of .so
realpath((char *)dlinfo.dli_fname, buf); realpath((char *)dlinfo.dli_fname, buf);
......
...@@ -182,7 +182,7 @@ void os::init_system_properties_values() { ...@@ -182,7 +182,7 @@ void os::init_system_properties_values() {
if (!getenv("_ALT_JAVA_HOME_DIR", home_dir, MAX_PATH)) { if (!getenv("_ALT_JAVA_HOME_DIR", home_dir, MAX_PATH)) {
os::jvm_path(home_dir, sizeof(home_dir)); os::jvm_path(home_dir, sizeof(home_dir));
// Found the full path to jvm[_g].dll. // Found the full path to jvm.dll.
// Now cut the path to <java_home>/jre if we can. // Now cut the path to <java_home>/jre if we can.
*(strrchr(home_dir, '\\')) = '\0'; /* get rid of \jvm.dll */ *(strrchr(home_dir, '\\')) = '\0'; /* get rid of \jvm.dll */
pslash = strrchr(home_dir, '\\'); pslash = strrchr(home_dir, '\\');
...@@ -1715,7 +1715,7 @@ void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) { ...@@ -1715,7 +1715,7 @@ void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) {
static char saved_jvm_path[MAX_PATH] = {0}; static char saved_jvm_path[MAX_PATH] = {0};
// Find the full path to the current module, jvm.dll or jvm_g.dll // Find the full path to the current module, jvm.dll
void os::jvm_path(char *buf, jint buflen) { void os::jvm_path(char *buf, jint buflen) {
// Error checking. // Error checking.
if (buflen < MAX_PATH) { if (buflen < MAX_PATH) {
......
...@@ -36,7 +36,7 @@ public class ProjectCreator { ...@@ -36,7 +36,7 @@ public class ProjectCreator {
+ "into .dsp file, substituting for path given in " + "into .dsp file, substituting for path given in "
+ "-sourceBase. Example: HotSpotWorkSpace>"); + "-sourceBase. Example: HotSpotWorkSpace>");
System.err.println(" -dllLoc <path to directory in which to put " System.err.println(" -dllLoc <path to directory in which to put "
+ "jvm.dll and jvm_g.dll; no trailing slash>"); + "jvm.dll; no trailing slash>");
System.err.println(" If any of the above are specified, " System.err.println(" If any of the above are specified, "
+ "they must all be."); + "they must all be.");
System.err.println(" Additional, optional arguments, which can be " System.err.println(" Additional, optional arguments, which can be "
......
...@@ -3030,7 +3030,6 @@ jint Arguments::parse(const JavaVMInitArgs* args) { ...@@ -3030,7 +3030,6 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
strcpy(shared_archive_path, jvm_path); strcpy(shared_archive_path, jvm_path);
strcat(shared_archive_path, os::file_separator()); strcat(shared_archive_path, os::file_separator());
strcat(shared_archive_path, "classes"); strcat(shared_archive_path, "classes");
DEBUG_ONLY(strcat(shared_archive_path, "_g");)
strcat(shared_archive_path, ".jsa"); strcat(shared_archive_path, ".jsa");
SharedArchivePath = shared_archive_path; SharedArchivePath = shared_archive_path;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册