--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.hpp Fri Dec 19 18:33:55 2014 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.hpp Fri Dec 19 22:52:02 2014 -0800
@@ -41,31 +41,24 @@
// Closure accessors
static OopClosure* mark_and_push_closure() { return &MarkSweep::mark_and_push_closure; }
- static VoidClosure* follow_stack_closure() { return (VoidClosure*)&MarkSweep::follow_stack_closure; }
+ static VoidClosure* follow_stack_closure() { return &MarkSweep::follow_stack_closure; }
static CLDClosure* follow_cld_closure() { return &MarkSweep::follow_cld_closure; }
- static OopClosure* adjust_pointer_closure() { return (OopClosure*)&MarkSweep::adjust_pointer_closure; }
+ static OopClosure* adjust_pointer_closure() { return &MarkSweep::adjust_pointer_closure; }
static CLDClosure* adjust_cld_closure() { return &MarkSweep::adjust_cld_closure; }
- static BoolObjectClosure* is_alive_closure() { return (BoolObjectClosure*)&MarkSweep::is_alive; }
+ static BoolObjectClosure* is_alive_closure() { return &MarkSweep::is_alive; }
- debug_only(public:) // Used for PSParallelCompact debugging
// Mark live objects
static void mark_sweep_phase1(bool clear_all_softrefs);
// Calculate new addresses
static void mark_sweep_phase2();
- debug_only(private:) // End used for PSParallelCompact debugging
// Update pointers
static void mark_sweep_phase3();
// Move objects to new positions
static void mark_sweep_phase4();
- debug_only(public:) // Used for PSParallelCompact debugging
// Temporary data structures for traversal and storing/restoring marks
static void allocate_stacks();
static void deallocate_stacks();
- static void set_ref_processor(ReferenceProcessor* rp) { // delete this method
- _ref_processor = rp;
- }
- debug_only(private:) // End used for PSParallelCompact debugging
// If objects are left in eden after a collection, try to move the boundary
// and absorb them into the old gen. Returns true if eden was emptied.
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.hpp Fri Dec 19 18:33:55 2014 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.hpp Fri Dec 19 22:52:02 2014 -0800
@@ -147,6 +147,10 @@
claimed_stack_depth()->push(p);
}
+ inline void promotion_trace_event(oop new_obj, oop old_obj, size_t obj_size,
+ uint age, bool tenured,
+ const PSPromotionLAB* lab);
+
protected:
static OopStarTaskQueueSet* stack_array_depth() { return _stack_array_depth; }
public:
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp Fri Dec 19 18:33:55 2014 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp Fri Dec 19 22:52:02 2014 -0800
@@ -64,6 +64,33 @@
claim_or_forward_internal_depth(p);
}
+inline void PSPromotionManager::promotion_trace_event(oop new_obj, oop old_obj,
+ size_t obj_size,
+ uint age, bool tenured,
+ const PSPromotionLAB* lab) {
+ // Skip if memory allocation failed
+ if (new_obj != NULL) {
+ const ParallelScavengeTracer* gc_tracer = PSScavenge::gc_tracer();
+
+ if (lab != NULL) {
+ // Promotion of object through newly allocated PLAB
+ if (gc_tracer->should_report_promotion_in_new_plab_event()) {
+ size_t obj_bytes = obj_size * HeapWordSize;
+ size_t lab_size = lab->capacity();
+ gc_tracer->report_promotion_in_new_plab_event(old_obj->klass(), obj_bytes,
+ age, tenured, lab_size);
+ }
+ } else {
+ // Promotion of object directly to heap
+ if (gc_tracer->should_report_promotion_outside_plab_event()) {
+ size_t obj_bytes = obj_size * HeapWordSize;
+ gc_tracer->report_promotion_outside_plab_event(old_obj->klass(), obj_bytes,
+ age, tenured);
+ }
+ }
+ }
+}
+
//
// This method is pretty bulky. It would be nice to split it up
// into smaller submethods, but we need to be careful not to hurt
@@ -85,11 +112,11 @@
bool new_obj_is_tenured = false;
size_t new_obj_size = o->size();
+ // Find the objects age, MT safe.
+ uint age = (test_mark->has_displaced_mark_helper() /* o->has_displaced_mark() */) ?
+ test_mark->displaced_mark_helper()->age() : test_mark->age();
+
if (!promote_immediately) {
- // Find the objects age, MT safe.
- uint age = (test_mark->has_displaced_mark_helper() /* o->has_displaced_mark() */) ?
- test_mark->displaced_mark_helper()->age() : test_mark->age();
-
// Try allocating obj in to-space (unless too old)
if (age < PSScavenge::tenuring_threshold()) {
new_obj = (oop) _young_lab.allocate(new_obj_size);
@@ -98,6 +125,7 @@
if (new_obj_size > (YoungPLABSize / 2)) {
// Allocate this object directly
new_obj = (oop)young_space()->cas_allocate(new_obj_size);
+ promotion_trace_event(new_obj, o, new_obj_size, age, false, NULL);
} else {
// Flush and fill
_young_lab.flush();
@@ -107,6 +135,7 @@
_young_lab.initialize(MemRegion(lab_base, YoungPLABSize));
// Try the young lab allocation again.
new_obj = (oop) _young_lab.allocate(new_obj_size);
+ promotion_trace_event(new_obj, o, new_obj_size, age, false, &_young_lab);
} else {
_young_gen_is_full = true;
}
@@ -132,6 +161,7 @@
if (new_obj_size > (OldPLABSize / 2)) {
// Allocate this object directly
new_obj = (oop)old_gen()->cas_allocate(new_obj_size);
+ promotion_trace_event(new_obj, o, new_obj_size, age, true, NULL);
} else {
// Flush and fill
_old_lab.flush();
@@ -148,6 +178,7 @@
_old_lab.initialize(MemRegion(lab_base, OldPLABSize));
// Try the old lab allocation again.
new_obj = (oop) _old_lab.allocate(new_obj_size);
+ promotion_trace_event(new_obj, o, new_obj_size, age, true, &_old_lab);
}
}
}
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp Fri Dec 19 18:33:55 2014 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp Fri Dec 19 22:52:02 2014 -0800
@@ -92,6 +92,7 @@
// Private accessors
static CardTableExtension* const card_table() { assert(_card_table != NULL, "Sanity"); return _card_table; }
+ static const ParallelScavengeTracer* gc_tracer() { return &_gc_tracer; }
public:
// Accessors
--- a/hotspot/test/TEST.groups Fri Dec 19 18:33:55 2014 +0100
+++ b/hotspot/test/TEST.groups Fri Dec 19 22:52:02 2014 -0800
@@ -410,7 +410,9 @@
-closed/compiler/loopopts/8021898
hotspot_gc = \
- sanity/ExecuteInternalVMTests.java
+ sanity/ExecuteInternalVMTests.java \
+ gc/ \
+ -gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java
hotspot_runtime = \
runtime/ \
@@ -429,7 +431,8 @@
-runtime/7158988/FieldMonitor.java
hotspot_runtime_closed = \
- sanity/ExecuteInternalVMTests.java
+ sanity/ExecuteInternalVMTests.java \
+ testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java
hotspot_serviceability = \
sanity/ExecuteInternalVMTests.java \
--- a/hotspot/test/gc/arguments/TestSurvivorAlignmentInBytesOption.java Fri Dec 19 18:33:55 2014 +0100
+++ b/hotspot/test/gc/arguments/TestSurvivorAlignmentInBytesOption.java Fri Dec 19 22:52:02 2014 -0800
@@ -22,29 +22,24 @@
*/
import com.oracle.java.testlibrary.ExitCode;
-import com.oracle.java.testlibrary.Utils;
import com.oracle.java.testlibrary.cli.CommandLineOptionTest;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
/**
* @test
* @bug 8031323
* @summary Verify SurvivorAlignmentInBytes option processing.
* @library /testlibrary
+ * @requires vm.opt.SurvivorAlignmentInBytes == null
+ * & vm.opt.ObjectAlignmentInBytes == null
+ * & vm.opt.UnlockExperimentalVMOptions == null
+ * & (vm.opt.IgnoreUnrecognizedVMOptions == null
+ * | vm.opt.IgnoreUnrecognizedVMOptions == "false")
* @run main TestSurvivorAlignmentInBytesOption
*/
public class TestSurvivorAlignmentInBytesOption {
- private static final String[] FILTERED_VM_OPTIONS
- = Utils.getFilteredTestJavaOpts(
- "UnlockExperimentalVMOptions",
- "SurvivorAlignmentInBytes",
- "ObjectAlignmentInBytes");
-
public static void main(String args[]) throws Throwable {
String optionName = "SurvivorAlignmentInBytes";
+ String unlockExperimentalVMOpts = "UnlockExperimentalVMOptions";
String optionIsExperimental
= CommandLineOptionTest.getExperimentalOptionErrorMessage(
optionName);
@@ -58,63 +53,55 @@
// with the warning message saying that that option is experimental.
CommandLineOptionTest.verifyJVMStartup(
new String[]{optionIsExperimental}, null, ExitCode.FAIL, false,
- TestSurvivorAlignmentInBytesOption.prepareOptions(
- "-XX:-UnlockExperimentalVMOptions",
- CommandLineOptionTest.prepareNumericFlag(
- optionName, 64)));
+ "-XX:-UnlockExperimentalVMOptions",
+ CommandLineOptionTest.prepareBooleanFlag(
+ unlockExperimentalVMOpts, false),
+ CommandLineOptionTest.prepareNumericFlag(optionName, 64));
// Verify that with -XX:+UnlockExperimentalVMOptions passed to JVM
// usage of SurvivorAlignmentInBytes option won't cause JVM startup
// failure.
CommandLineOptionTest.verifyJVMStartup(
null, new String[]{optionIsExperimental}, ExitCode.OK, false,
- TestSurvivorAlignmentInBytesOption.prepareOptions(
- CommandLineOptionTest.prepareNumericFlag(
- optionName, 64)));
+ CommandLineOptionTest.prepareBooleanFlag(
+ unlockExperimentalVMOpts, true),
+ CommandLineOptionTest.prepareNumericFlag(optionName, 64));
// Verify that if specified SurvivorAlignmentInBytes is lower then
// ObjectAlignmentInBytes, then the JVM startup will fail with
// appropriate error message.
CommandLineOptionTest.verifyJVMStartup(
new String[]{valueIsTooSmall}, null, ExitCode.FAIL, false,
- TestSurvivorAlignmentInBytesOption.prepareOptions(
- CommandLineOptionTest.prepareNumericFlag(
- optionName, 2)));
+ CommandLineOptionTest.prepareBooleanFlag(
+ unlockExperimentalVMOpts, true),
+ CommandLineOptionTest.prepareNumericFlag(optionName, 2));
// Verify that if specified SurvivorAlignmentInBytes value is not
// a power of 2 then the JVM startup will fail with appropriate error
// message.
CommandLineOptionTest.verifyJVMStartup(
new String[]{mustBePowerOf2}, null, ExitCode.FAIL, false,
- TestSurvivorAlignmentInBytesOption.prepareOptions(
- CommandLineOptionTest.prepareNumericFlag(
- optionName, 127)));
+ CommandLineOptionTest.prepareBooleanFlag(
+ unlockExperimentalVMOpts, true),
+ CommandLineOptionTest.prepareNumericFlag(optionName, 127));
// Verify that if SurvivorAlignmentInBytes has correct value, then
// the JVM will be started without errors.
CommandLineOptionTest.verifyJVMStartup(
null, new String[]{".*SurvivorAlignmentInBytes.*"},
ExitCode.OK, false,
- TestSurvivorAlignmentInBytesOption.prepareOptions(
- CommandLineOptionTest.prepareNumericFlag(
- optionName, 128)));
+ CommandLineOptionTest.prepareBooleanFlag(
+ unlockExperimentalVMOpts, true),
+ CommandLineOptionTest.prepareNumericFlag(optionName, 128));
// Verify that we can setup different SurvivorAlignmentInBytes values.
for (int alignment = 32; alignment <= 128; alignment *= 2) {
CommandLineOptionTest.verifyOptionValue(optionName,
- Integer.toString(alignment), false,
- TestSurvivorAlignmentInBytesOption.prepareOptions(
- CommandLineOptionTest.prepareNumericFlag(
- optionName, alignment)));
+ Integer.toString(alignment),
+ CommandLineOptionTest.prepareBooleanFlag(
+ unlockExperimentalVMOpts, true),
+ CommandLineOptionTest.prepareNumericFlag(
+ optionName, alignment));
}
}
-
- private static String[] prepareOptions(String... options) {
- List<String> finalOptions = new LinkedList<>();
- Collections.addAll(finalOptions,
- TestSurvivorAlignmentInBytesOption.FILTERED_VM_OPTIONS);
- finalOptions.add(CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS);
- Collections.addAll(finalOptions, options);
- return finalOptions.toArray(new String[finalOptions.size()]);
- }
}
--- a/hotspot/test/gc/survivorAlignment/TestAllocationInEden.java Fri Dec 19 18:33:55 2014 +0100
+++ b/hotspot/test/gc/survivorAlignment/TestAllocationInEden.java Fri Dec 19 22:52:02 2014 -0800
@@ -34,37 +34,43 @@
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32 -XX:-UseTLAB
- * -XX:OldSize=128m -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=128m -XX:MaxHeapSize=192m
+ * -XX:-ExplicitGCInvokesConcurrent
* TestAllocationInEden 10m 9 EDEN
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32 -XX:-UseTLAB
- * -XX:OldSize=128m -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=128m -XX:MaxHeapSize=192m
+ * -XX:-ExplicitGCInvokesConcurrent
* TestAllocationInEden 10m 47 EDEN
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64 -XX:-UseTLAB
- * -XX:OldSize=128m -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=128m -XX:MaxHeapSize=192m
+ * -XX:-ExplicitGCInvokesConcurrent
* TestAllocationInEden 10m 9 EDEN
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64 -XX:-UseTLAB
- * -XX:OldSize=128m -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=128m -XX:MaxHeapSize=192m
+ * -XX:-ExplicitGCInvokesConcurrent
* TestAllocationInEden 10m 87 EDEN
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128 -XX:-UseTLAB
- * -XX:OldSize=128m -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=128m -XX:MaxHeapSize=192m
+ * -XX:-ExplicitGCInvokesConcurrent
* TestAllocationInEden 10m 9 EDEN
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128 -XX:-UseTLAB
- * -XX:OldSize=128m -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=128m -XX:MaxHeapSize=192m
+ * -XX:-ExplicitGCInvokesConcurrent
* TestAllocationInEden 10m 147 EDEN
*/
public class TestAllocationInEden {
--- a/hotspot/test/gc/survivorAlignment/TestPromotionFromEdenToTenured.java Fri Dec 19 18:33:55 2014 +0100
+++ b/hotspot/test/gc/survivorAlignment/TestPromotionFromEdenToTenured.java Fri Dec 19 22:52:02 2014 -0800
@@ -33,43 +33,43 @@
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
- * -XX:OldSize=32m -XX:SurvivorRatio=1
- * -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=32m -XX:MaxHeapSize=96m -XX:SurvivorRatio=1
+ * -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32
* TestPromotionFromEdenToTenured 10m 9 TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
- * -XX:OldSize=32m -XX:SurvivorRatio=1
- * -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=32m -XX:MaxHeapSize=96m -XX:SurvivorRatio=1
+ * -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32
* TestPromotionFromEdenToTenured 10m 47 TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
- * -XX:OldSize=32m -XX:SurvivorRatio=1
- * -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=32m -XX:MaxHeapSize=96m
+ * -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64
* TestPromotionFromEdenToTenured 10m 9 TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
- * -XX:OldSize=32m -XX:SurvivorRatio=1
- * -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=32m -XX:MaxHeapSize=128m
+ * -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64
* TestPromotionFromEdenToTenured 10m 87 TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
- * -XX:OldSize=32M -XX:SurvivorRatio=1
- * -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=32M -XX:MaxHeapSize=96m -XX:SurvivorRatio=1
+ * -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128
* TestPromotionFromEdenToTenured 10m 9 TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
- * -XX:OldSize=32m -XX:SurvivorRatio=1
- * -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=32m -XX:MaxHeapSize=96m -XX:SurvivorRatio=1
+ * -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128
* TestPromotionFromEdenToTenured 10m 147 TENURED
--- a/hotspot/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterFullGC.java Fri Dec 19 18:33:55 2014 +0100
+++ b/hotspot/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterFullGC.java Fri Dec 19 22:52:02 2014 -0800
@@ -33,37 +33,37 @@
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
- * -XX:OldSize=32m -XX:SurvivorRatio=1
- * -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=32m -XX:MaxHeapSize=160m
+ * -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32
* TestPromotionFromSurvivorToTenuredAfterFullGC 10m 9 TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
- * -XX:OldSize=32m -XX:SurvivorRatio=1
- * -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=32m -XX:MaxHeapSize=160m
+ * -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32
* TestPromotionFromSurvivorToTenuredAfterFullGC 20m 47
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=200m -XX:MaxNewSize=200m
- * -XX:OldSize=32m -XX:InitialHeapSize=232m
+ * -XX:OldSize=32m -XX:MaxHeapSize=232m
* -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64
* TestPromotionFromSurvivorToTenuredAfterFullGC 10m 9 TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
- * -XX:OldSize=32m -XX:SurvivorRatio=1
- * -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=32m -XX:MaxHeapSize=160m
+ * -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64
* TestPromotionFromSurvivorToTenuredAfterFullGC 20m 87
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=256m -XX:MaxNewSize=256m
- * -XX:OldSize=32M -XX:InitialHeapSize=288m
+ * -XX:OldSize=32M -XX:MaxHeapSize=288m
* -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128
@@ -71,8 +71,8 @@
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
- * -XX:OldSize=32m -XX:SurvivorRatio=1
- * -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=32m -XX:MaxHeapSize=160m
+ * -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128
* TestPromotionFromSurvivorToTenuredAfterFullGC 20m 147
--- a/hotspot/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterMinorGC.java Fri Dec 19 18:33:55 2014 +0100
+++ b/hotspot/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterMinorGC.java Fri Dec 19 22:52:02 2014 -0800
@@ -34,7 +34,7 @@
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
- * -XX:OldSize=32M -XX:SurvivorRatio=1
+ * -XX:OldSize=32M -XX:MaxHeapSize=160m -XX:SurvivorRatio=1
* -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32
@@ -42,7 +42,7 @@
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
- * -XX:OldSize=32M -XX:SurvivorRatio=1
+ * -XX:OldSize=32M -XX:MaxHeapSize=160m -XX:SurvivorRatio=1
* -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32
@@ -50,15 +50,15 @@
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=200m -XX:MaxNewSize=200m
- * -XX:OldSize=32M -XX:InitialHeapSize=232m
- * -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=32M -XX:MaxHeapSize=232m -XX:SurvivorRatio=1
+ * -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64
* TestPromotionFromSurvivorToTenuredAfterMinorGC 10m 9
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
- * -XX:OldSize=32M -XX:SurvivorRatio=1
+ * -XX:OldSize=32M -XX:MaxHeapSize=160m -XX:SurvivorRatio=1
* -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64
@@ -66,15 +66,15 @@
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=256m -XX:MaxNewSize=256m
- * -XX:OldSize=32M -XX:InitialHeapSize=288m
- * -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent
+ * -XX:OldSize=32M -XX:MaxHeapSize=288m -XX:SurvivorRatio=1
+ * -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128
* TestPromotionFromSurvivorToTenuredAfterMinorGC 10m 9
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
- * -XX:OldSize=32M -XX:SurvivorRatio=1
+ * -XX:OldSize=32M -XX:MaxHeapSize=160m -XX:SurvivorRatio=1
* -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128
--- a/hotspot/test/gc/survivorAlignment/TestPromotionToSurvivor.java Fri Dec 19 18:33:55 2014 +0100
+++ b/hotspot/test/gc/survivorAlignment/TestPromotionToSurvivor.java Fri Dec 19 22:52:02 2014 -0800
@@ -35,36 +35,37 @@
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32 -XX:OldSize=128m
- * -XX:-ExplicitGCInvokesConcurrent
+ * -XX:MaxHeapSize=256m -XX:-ExplicitGCInvokesConcurrent
* TestPromotionToSurvivor 10m 9 SURVIVOR
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32 -XX:OldSize=128m
+ * -XX:MaxHeapSize=256m -XX:-ExplicitGCInvokesConcurrent
* TestPromotionToSurvivor 20m 47 SURVIVOR
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64 -XX:OldSize=128m
- * -XX:-ExplicitGCInvokesConcurrent
+ * -XX:MaxHeapSize=256m -XX:-ExplicitGCInvokesConcurrent
* TestPromotionToSurvivor 8m 9 SURVIVOR
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64 -XX:OldSize=128m
- * -XX:-ExplicitGCInvokesConcurrent
+ * -XX:MaxHeapSize=256m -XX:-ExplicitGCInvokesConcurrent
* TestPromotionToSurvivor 20m 87 SURVIVOR
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=256m -XX:MaxNewSize=256m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
- * -XX:SurvivorAlignmentInBytes=128 -XX:OldSize=32m
- * -XX:InitialHeapSize=288m -XX:-ExplicitGCInvokesConcurrent
+ * -XX:SurvivorAlignmentInBytes=128 -XX:OldSize=128m
+ * -XX:MaxHeapSize=384m -XX:-ExplicitGCInvokesConcurrent
* TestPromotionToSurvivor 10m 9 SURVIVOR
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128 -XX:OldSize=128m
- * -XX:-ExplicitGCInvokesConcurrent
+ * -XX:MaxHeapSize=256m -XX:-ExplicitGCInvokesConcurrent
* TestPromotionToSurvivor 20m 147 SURVIVOR
*/
public class TestPromotionToSurvivor {
--- a/hotspot/test/runtime/Metaspace/FragmentMetaspace.java Fri Dec 19 18:33:55 2014 +0100
+++ b/hotspot/test/runtime/Metaspace/FragmentMetaspace.java Fri Dec 19 22:52:02 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -25,7 +25,7 @@
* @test
* @library /runtime/testlibrary
* @build GeneratedClassLoader
- * @run main/othervm/timeout=200 FragmentMetaspace
+ * @run main/othervm/timeout=200 -Xmx300m FragmentMetaspace
*/
import java.io.IOException;
@@ -38,25 +38,34 @@
*/
public class FragmentMetaspace {
+ public static Class<?> c;
+
public static void main(String... args) {
- runGrowing(Long.valueOf(System.getProperty("time", "80000")));
+ runGrowing(Long.valueOf(System.getProperty("time", "80000")),
+ Integer.valueOf(System.getProperty("iterations", "200")));
// try to clean up and unload classes to decrease
// class verification time in debug vm
System.gc();
}
- private static void runGrowing(long time) {
+ private static void runGrowing(long time, int iterations) {
long startTime = System.currentTimeMillis();
- for (int i = 0; System.currentTimeMillis() < startTime + time; ++i) {
+ for (int i = 0; System.currentTimeMillis() < startTime + time && i < iterations; ++i) {
try {
GeneratedClassLoader gcl = new GeneratedClassLoader();
- Class<?> c = gcl.getGeneratedClasses(i, 100)[0];
+ // getGeneratedClasses throws a RuntimeException in cases where
+ // the javac exit code is not 0. If the original reason for the exception is
+ // a "java.lang.OutOfMemoryError: Java heap space",
+ // increase the heap size in the @run tag and rerun the test.
+ // The heap can be exhausted by this test, but heap exhaustion
+ // is not a failure mode of this test and should be ignored.
+ c = gcl.getGeneratedClasses(i, 100)[0];
c.newInstance();
c = null;
gcl = null;
- } catch (IOException|InstantiationException|IllegalAccessException ex) {
+ } catch (IOException | InstantiationException | IllegalAccessException ex) {
throw new RuntimeException(ex);
}
}
--- a/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java Fri Dec 19 18:33:55 2014 +0100
+++ b/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java Fri Dec 19 22:52:02 2014 -0800
@@ -47,7 +47,8 @@
BITNESS("is32bit", "is64bit"),
OS("isLinux", "isSolaris", "isWindows", "isOSX"),
VM_TYPE("isClient", "isServer", "isGraal", "isMinimal"),
- IGNORED("isEmbedded", "isDebugBuild");
+ IGNORED("isEmbedded", "isDebugBuild", "shouldSAAttach",
+ "canPtraceAttachLinux", "canAttachOSX");
public final List<String> methodNames;