mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
6953477: Increase portability and flexibility of building Hotspot
A collection of portability improvements including shared code support for PPC, ARM platforms, software floating point, cross compilation support and improvements in error crash detail. Reviewed-by: phh, never, coleenp, dholmes
This commit is contained in:
parent
c45761e2a8
commit
b95c7e9523
113 changed files with 1669 additions and 559 deletions
|
@ -2665,6 +2665,28 @@ jint Arguments::finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_req
|
|||
}
|
||||
#endif
|
||||
|
||||
// If we are running in a headless jre, force java.awt.headless property
|
||||
// to be true unless the property has already been set.
|
||||
// Also allow the OS environment variable JAVA_AWT_HEADLESS to set headless state.
|
||||
if (os::is_headless_jre()) {
|
||||
const char* headless = Arguments::get_property("java.awt.headless");
|
||||
if (headless == NULL) {
|
||||
char envbuffer[128];
|
||||
if (!os::getenv("JAVA_AWT_HEADLESS", envbuffer, sizeof(envbuffer))) {
|
||||
if (!add_property("java.awt.headless=true")) {
|
||||
return JNI_ENOMEM;
|
||||
}
|
||||
} else {
|
||||
char buffer[256];
|
||||
strcpy(buffer, "java.awt.headless=");
|
||||
strcat(buffer, envbuffer);
|
||||
if (!add_property(buffer)) {
|
||||
return JNI_ENOMEM;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!check_vm_args_consistency()) {
|
||||
return JNI_ERR;
|
||||
}
|
||||
|
@ -2985,6 +3007,14 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
|
|||
CommandLineFlags::printFlags();
|
||||
}
|
||||
|
||||
// Apply CPU specific policy for the BiasedLocking
|
||||
if (UseBiasedLocking) {
|
||||
if (!VM_Version::use_biased_locking() &&
|
||||
!(FLAG_IS_CMDLINE(UseBiasedLocking))) {
|
||||
UseBiasedLocking = false;
|
||||
}
|
||||
}
|
||||
|
||||
return JNI_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue