summaryrefslogtreecommitdiff
path: root/test/1337-gc-coverage/src/Main.java
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2019-04-09 14:10:59 -0700
committer Mathieu Chartier <mathieuc@google.com> 2019-04-10 19:30:37 +0000
commitb52df537b8ade1bfe936a27f4bf0ae8a2cdfc9b4 (patch)
treec721a689e026d1c1d1e8133b06bb4a3f02f9d47a /test/1337-gc-coverage/src/Main.java
parent2d79011ec108fd80289d9898adcbef48781ab0f3 (diff)
Revert^2 "Remove support for moving GC collector transitions"
Fixed incorrect LOG(FATAL) for no-op collector transitions. Bug: 78286368 Bug: 130236304 Test: booting This reverts commit 8f88207206fe39f6dcb4e76e24716c81566f26cc. Change-Id: I565124330478fad9fb50fe1caf9442ec05f13a46
Diffstat (limited to 'test/1337-gc-coverage/src/Main.java')
-rw-r--r--test/1337-gc-coverage/src/Main.java31
1 files changed, 0 insertions, 31 deletions
diff --git a/test/1337-gc-coverage/src/Main.java b/test/1337-gc-coverage/src/Main.java
index 7875eb1824..128ad4d83c 100644
--- a/test/1337-gc-coverage/src/Main.java
+++ b/test/1337-gc-coverage/src/Main.java
@@ -22,7 +22,6 @@ public class Main {
public static void main(String[] args) {
System.loadLibrary(args[0]);
testHomogeneousCompaction();
- testCollectorTransitions();
System.out.println("Done.");
}
@@ -68,40 +67,10 @@ public class Main {
}
}
- private static void testCollectorTransitions() {
- if (supportCollectorTransition()) {
- Object o = new Object();
- // Transition to semi-space collector.
- allocateStuff();
- transitionToSS();
- allocateStuff();
- long addressBefore = objectAddress(o);
- Runtime.getRuntime().gc();
- long addressAfter = objectAddress(o);
- if (addressBefore == addressAfter) {
- System.out.println("error: Expected different adddress " + addressBefore + " vs " +
- addressAfter);
- }
- // Transition back to CMS.
- transitionToCMS();
- allocateStuff();
- addressBefore = objectAddress(o);
- Runtime.getRuntime().gc();
- addressAfter = objectAddress(o);
- if (addressBefore != addressAfter) {
- System.out.println("error: Expected same adddress " + addressBefore + " vs " +
- addressAfter);
- }
- }
- }
-
// Methods to get access to ART internals.
private static native boolean supportHomogeneousSpaceCompact();
private static native boolean performHomogeneousSpaceCompact();
private static native void incrementDisableMovingGC();
private static native void decrementDisableMovingGC();
private static native long objectAddress(Object object);
- private static native boolean supportCollectorTransition();
- private static native void transitionToSS();
- private static native void transitionToCMS();
}