--- a/hotspot/src/share/vm/runtime/arguments.cpp Fri Sep 20 09:30:02 2013 -0400
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Fri Sep 20 09:44:04 2013 -0400
@@ -1096,6 +1096,7 @@
}
}
+#if defined(COMPILER2) || defined(_LP64) || !INCLUDE_CDS
// Conflict: required to use shared spaces (-Xshare:on), but
// incompatible command line options were chosen.
@@ -1108,6 +1109,7 @@
FLAG_SET_DEFAULT(UseSharedSpaces, false);
}
}
+#endif
void Arguments::set_tiered_flags() {
// With tiered, set default policy to AdvancedThresholdPolicy, which is 3.
@@ -1492,16 +1494,18 @@
FLAG_SET_ERGO(bool, UseParallelGC, true);
}
}
- // Shared spaces work fine with other GCs but causes bytecode rewriting
- // to be disabled, which hurts interpreter performance and decreases
- // server performance. On server class machines, keep the default
- // off unless it is asked for. Future work: either add bytecode rewriting
- // at link time, or rewrite bytecodes in non-shared methods.
- if (!DumpSharedSpaces && !RequireSharedSpaces &&
- (FLAG_IS_DEFAULT(UseSharedSpaces) || !UseSharedSpaces)) {
- no_shared_spaces();
- }
}
+#ifdef COMPILER2
+ // Shared spaces work fine with other GCs but causes bytecode rewriting
+ // to be disabled, which hurts interpreter performance and decreases
+ // server performance. When -server is specified, keep the default off
+ // unless it is asked for. Future work: either add bytecode rewriting
+ // at link time, or rewrite bytecodes in non-shared methods.
+ if (!DumpSharedSpaces && !RequireSharedSpaces &&
+ (FLAG_IS_DEFAULT(UseSharedSpaces) || !UseSharedSpaces)) {
+ no_shared_spaces();
+ }
+#endif
#ifndef ZERO
#ifdef _LP64
--- a/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java Fri Sep 20 09:30:02 2013 -0400
+++ b/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java Fri Sep 20 09:44:04 2013 -0400
@@ -33,16 +33,9 @@
public class XShareAuto {
public static void main(String[] args) throws Exception {
- if (!Platform.is64bit()) {
- System.out.println("ObjectAlignmentInBytes for CDS is only " +
- "supported on 64bit platforms; this plaform is " +
- System.getProperty("sun.arch.data.model"));
- System.out.println("Skipping the test");
- return;
- }
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
- "-XX:+UnlockDiagnosticVMOptions", "-XX:SharedArchiveFile=./sample.jsa",
- "-Xshare:dump");
+ "-server", "-XX:+UnlockDiagnosticVMOptions",
+ "-XX:SharedArchiveFile=./sample.jsa", "-Xshare:dump");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldContain("Loading classes to share");
output.shouldHaveExitValue(0);