--- a/hotspot/src/os_cpu/bsd_x86/vm/globals_bsd_x86.hpp Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/src/os_cpu/bsd_x86/vm/globals_bsd_x86.hpp Thu Mar 21 06:53:53 2013 -0700
@@ -46,7 +46,7 @@
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
-// Used on 64 bit platforms for UseCompressedOops base address or CDS
+// Used on 64 bit platforms for UseCompressedOops base address
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
#endif // OS_CPU_BSD_X86_VM_GLOBALS_BSD_X86_HPP
--- a/hotspot/src/os_cpu/bsd_zero/vm/globals_bsd_zero.hpp Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/src/os_cpu/bsd_zero/vm/globals_bsd_zero.hpp Thu Mar 21 06:53:53 2013 -0700
@@ -41,7 +41,7 @@
define_pd_global(intx, CompilerThreadStackSize, 0);
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
-// Used on 64 bit platforms for UseCompressedOops base address or CDS
+// Used on 64 bit platforms for UseCompressedOops base address
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
#endif // OS_CPU_BSD_ZERO_VM_GLOBALS_BSD_ZERO_HPP
--- a/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp Thu Mar 21 06:53:53 2013 -0700
@@ -33,7 +33,7 @@
define_pd_global(uintx, JVMInvokeMethodSlack, 12288);
define_pd_global(intx, CompilerThreadStackSize, 0);
-// Used on 64 bit platforms for UseCompressedOops base address or CDS
+// Used on 64 bit platforms for UseCompressedOops base address
define_pd_global(uintx, HeapBaseMinAddress, CONST64(4)*G);
#endif // OS_CPU_LINUX_SPARC_VM_GLOBALS_LINUX_SPARC_HPP
--- a/hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp Thu Mar 21 06:53:53 2013 -0700
@@ -44,7 +44,7 @@
define_pd_global(uintx,JVMInvokeMethodSlack, 8192);
-// Used on 64 bit platforms for UseCompressedOops base address or CDS
+// Used on 64 bit platforms for UseCompressedOops base address
define_pd_global(uintx,HeapBaseMinAddress, 2*G);
#endif // OS_CPU_LINUX_X86_VM_GLOBALS_LINUX_X86_HPP
--- a/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp Thu Mar 21 06:53:53 2013 -0700
@@ -41,7 +41,7 @@
define_pd_global(intx, CompilerThreadStackSize, 0);
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
-// Used on 64 bit platforms for UseCompressedOops base address or CDS
+// Used on 64 bit platforms for UseCompressedOops base address
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
#endif // OS_CPU_LINUX_ZERO_VM_GLOBALS_LINUX_ZERO_HPP
--- a/hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp Thu Mar 21 06:53:53 2013 -0700
@@ -33,7 +33,7 @@
define_pd_global(uintx, JVMInvokeMethodSlack, 12288);
define_pd_global(intx, CompilerThreadStackSize, 0);
-// Used on 64 bit platforms for UseCompressedOops base address or CDS
+// Used on 64 bit platforms for UseCompressedOops base address
#ifdef _LP64
define_pd_global(uintx, HeapBaseMinAddress, CONST64(4)*G);
#else
--- a/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp Thu Mar 21 06:53:53 2013 -0700
@@ -43,7 +43,7 @@
define_pd_global(intx, CompilerThreadStackSize, 0);
-// Used on 64 bit platforms for UseCompressedOops base address or CDS
+// Used on 64 bit platforms for UseCompressedOops base address
define_pd_global(uintx,HeapBaseMinAddress, 256*M);
#endif // OS_CPU_SOLARIS_X86_VM_GLOBALS_SOLARIS_X86_HPP
--- a/hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp Thu Mar 21 06:53:53 2013 -0700
@@ -45,7 +45,7 @@
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
-// Used on 64 bit platforms for UseCompressedOops base address or CDS
+// Used on 64 bit platforms for UseCompressedOops base address
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
#endif // OS_CPU_WINDOWS_X86_VM_GLOBALS_WINDOWS_X86_HPP
--- a/hotspot/src/share/vm/memory/filemap.cpp Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/src/share/vm/memory/filemap.cpp Thu Mar 21 06:53:53 2013 -0700
@@ -372,7 +372,7 @@
// other reserved memory (like the code cache).
ReservedSpace rs(size, alignment, false, requested_addr);
if (!rs.is_reserved()) {
- fail_continue(err_msg("Unable to reserved shared space at required address " INTPTR_FORMAT, requested_addr));
+ fail_continue(err_msg("Unable to reserve shared space at required address " INTPTR_FORMAT, requested_addr));
return rs;
}
// the reserved virtual memory is for mapping class data sharing archive
--- a/hotspot/src/share/vm/memory/metaspace.cpp Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/src/share/vm/memory/metaspace.cpp Thu Mar 21 06:53:53 2013 -0700
@@ -337,27 +337,16 @@
// align up to vm allocation granularity
byte_size = align_size_up(byte_size, os::vm_allocation_granularity());
- // This allocates memory with mmap. For DumpSharedspaces, allocate the
- // space at low memory so that other shared images don't conflict.
- // This is the same address as memory needed for UseCompressedOops but
- // compressed oops don't work with CDS (offsets in metadata are wrong), so
- // borrow the same address.
+ // This allocates memory with mmap. For DumpSharedspaces, try to reserve
+ // configurable address, generally at the top of the Java heap so other
+ // memory addresses don't conflict.
if (DumpSharedSpaces) {
- char* shared_base = (char*)HeapBaseMinAddress;
+ char* shared_base = (char*)SharedBaseAddress;
_rs = ReservedSpace(byte_size, 0, false, shared_base, 0);
if (_rs.is_reserved()) {
- assert(_rs.base() == shared_base, "should match");
+ assert(shared_base == 0 || _rs.base() == shared_base, "should match");
} else {
- // If we are dumping the heap, then allocate a wasted block of address
- // space in order to push the heap to a lower address. This extra
- // address range allows for other (or larger) libraries to be loaded
- // without them occupying the space required for the shared spaces.
- uintx reserved = 0;
- uintx block_size = 64*1024*1024;
- while (reserved < SharedDummyBlockSize) {
- char* dummy = os::reserve_memory(block_size);
- reserved += block_size;
- }
+ // Get a mmap region anywhere if the SharedBaseAddress fails.
_rs = ReservedSpace(byte_size);
}
MetaspaceShared::set_shared_rs(&_rs);
--- a/hotspot/src/share/vm/prims/jvm.cpp Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/src/share/vm/prims/jvm.cpp Thu Mar 21 06:53:53 2013 -0700
@@ -1722,7 +1722,7 @@
int i;
for (i = 0; i < methods_length; i++) {
methodHandle method(THREAD, methods->at(i));
- if (!method->is_initializer()) {
+ if (!method->is_initializer() && !method->is_overpass()) {
if (!publicOnly || method->is_public()) {
++num_methods;
}
@@ -1736,7 +1736,7 @@
int out_idx = 0;
for (i = 0; i < methods_length; i++) {
methodHandle method(THREAD, methods->at(i));
- if (!method->is_initializer()) {
+ if (!method->is_initializer() && !method->is_overpass()) {
if (!publicOnly || method->is_public()) {
oop m = Reflection::new_method(method, UseNewReflection, false, CHECK_NULL);
result->obj_at_put(out_idx, m);
--- a/hotspot/src/share/vm/runtime/globals.hpp Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/src/share/vm/runtime/globals.hpp Thu Mar 21 06:53:53 2013 -0700
@@ -3578,8 +3578,9 @@
product(uintx, SharedMiscCodeSize, 120*K, \
"Size of the shared miscellaneous code area (in bytes)") \
\
- product(uintx, SharedDummyBlockSize, 0, \
- "Size of dummy block used to shift heap addresses (in bytes)") \
+ product(uintx, SharedBaseAddress, LP64_ONLY(32*G) \
+ NOT_LP64(LINUX_ONLY(2*G) NOT_LINUX(0)), \
+ "Address to allocate shared memory region for class data") \
\
diagnostic(bool, EnableInvokeDynamic, true, \
"support JSR 292 (method handles, invokedynamic, " \
--- a/hotspot/src/share/vm/runtime/os.cpp Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/src/share/vm/runtime/os.cpp Thu Mar 21 06:53:53 2013 -0700
@@ -577,15 +577,15 @@
// condition without really running the system out of memory.
//
static u_char* testMalloc(size_t alloc_size) {
+ assert(MallocMaxTestWords > 0, "sanity check");
- if (MallocMaxTestWords > 0 &&
- (cur_malloc_words + (alloc_size / BytesPerWord)) > MallocMaxTestWords) {
+ if ((cur_malloc_words + (alloc_size / BytesPerWord)) > MallocMaxTestWords) {
return NULL;
}
u_char* ptr = (u_char*)::malloc(alloc_size);
- if (MallocMaxTestWords > 0 && (ptr != NULL)) {
+ if (ptr != NULL) {
Atomic::add(((jint) (alloc_size / BytesPerWord)),
(volatile jint *) &cur_malloc_words);
}
--- a/hotspot/test/runtime/CommandLine/BooleanFlagWithInvalidValue.java Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/test/runtime/CommandLine/BooleanFlagWithInvalidValue.java Thu Mar 21 06:53:53 2013 -0700
@@ -33,17 +33,17 @@
public class BooleanFlagWithInvalidValue {
public static void main(String[] args) throws Exception {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
- "-XX:+UseLargePages=8", "-version");
+ "-XX:+PrintWarnings=8", "-version");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
- output.shouldContain("Improperly specified VM option 'UseLargePages=8'");
+ output.shouldContain("Improperly specified VM option 'PrintWarnings=8'");
output.shouldHaveExitValue(1);
pb = ProcessTools.createJavaProcessBuilder(
- "-XX:-UseLargePages=8", "-version");
+ "-XX:-PrintWarnings=8", "-version");
output = new OutputAnalyzer(pb.start());
- output.shouldContain("Improperly specified VM option 'UseLargePages=8'");
+ output.shouldContain("Improperly specified VM option 'PrintWarnings=8'");
output.shouldHaveExitValue(1);
}
}
--- a/hotspot/test/runtime/CommandLine/FlagWithInvalidValue.java Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/test/runtime/CommandLine/FlagWithInvalidValue.java Thu Mar 21 06:53:53 2013 -0700
@@ -33,10 +33,10 @@
public class FlagWithInvalidValue {
public static void main(String[] args) throws Exception {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
- "-XX:ObjectAlignmentInBytes=v", "-version");
+ "-XX:MaxRAMFraction=v", "-version");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
- output.shouldContain("Improperly specified VM option 'ObjectAlignmentInBytes=v'");
+ output.shouldContain("Improperly specified VM option 'MaxRAMFraction=v'");
output.shouldHaveExitValue(1);
}
}
--- a/hotspot/test/runtime/CommandLine/NonBooleanFlagWithInvalidBooleanPrefix.java Wed Mar 20 09:42:48 2013 -0400
+++ b/hotspot/test/runtime/CommandLine/NonBooleanFlagWithInvalidBooleanPrefix.java Thu Mar 21 06:53:53 2013 -0700
@@ -33,17 +33,17 @@
public class NonBooleanFlagWithInvalidBooleanPrefix {
public static void main(String[] args) throws Exception {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
- "-XX:-ObjectAlignmentInBytes=16", "-version");
+ "-XX:-MaxRAMFraction=16", "-version");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
- output.shouldContain("Unexpected +/- setting in VM option 'ObjectAlignmentInBytes=16'");
+ output.shouldContain("Unexpected +/- setting in VM option 'MaxRAMFraction=16'");
output.shouldHaveExitValue(1);
pb = ProcessTools.createJavaProcessBuilder(
- "-XX:+ObjectAlignmentInBytes=16", "-version");
+ "-XX:+MaxRAMFraction=16", "-version");
output = new OutputAnalyzer(pb.start());
- output.shouldContain("Unexpected +/- setting in VM option 'ObjectAlignmentInBytes=16'");
+ output.shouldContain("Unexpected +/- setting in VM option 'MaxRAMFraction=16'");
output.shouldHaveExitValue(1);
}