< prev index next >
test/compiler/codecache/jmx/ThresholdNotificationsTest.java
Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke
@@ -19,35 +19,44 @@
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
-import jdk.test.lib.Asserts;
-import jdk.test.lib.Utils;
-import java.lang.management.ManagementFactory;
-import java.lang.management.MemoryNotificationInfo;
-import java.lang.management.MemoryPoolMXBean;
-import javax.management.ListenerNotFoundException;
-import javax.management.Notification;
-import javax.management.NotificationEmitter;
-import javax.management.NotificationListener;
-import sun.hotspot.code.BlobType;
-
/*
* @test ThresholdNotificationsTest
- * @library /testlibrary /test/lib
+ * @summary testing of getUsageThreshold()
+ * @library /testlibrary /test/lib /
* @modules java.base/jdk.internal.misc
* java.management
- * @build ThresholdNotificationsTest
- * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ *
+ * @build compiler.codecache.jmx.ThresholdNotificationsTest
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run main/othervm -Xbootclasspath/a:. -XX:-UseCodeCacheFlushing
- * -XX:-MethodFlushing -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
- * -XX:+SegmentedCodeCache -XX:CompileCommand=compileonly,null::*
- * ThresholdNotificationsTest
- * @summary testing of getUsageThreshold()
+ * -XX:+WhiteBoxAPI -XX:-MethodFlushing -XX:CompileCommand=compileonly,null::*
+ * -XX:+SegmentedCodeCache
+ * compiler.codecache.jmx.ThresholdNotificationsTest
+ * @run main/othervm -Xbootclasspath/a:. -XX:-UseCodeCacheFlushing
+ * -XX:+WhiteBoxAPI -XX:-MethodFlushing -XX:CompileCommand=compileonly,null::*
+ * -XX:-SegmentedCodeCache
+ * compiler.codecache.jmx.ThresholdNotificationsTest
*/
+
+package compiler.codecache.jmx;
+
+import jdk.test.lib.Asserts;
+import jdk.test.lib.Utils;
+import sun.hotspot.code.BlobType;
+
+import javax.management.ListenerNotFoundException;
+import javax.management.Notification;
+import javax.management.NotificationEmitter;
+import javax.management.NotificationListener;
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryNotificationInfo;
+import java.lang.management.MemoryPoolMXBean;
+
public class ThresholdNotificationsTest implements NotificationListener {
private final static long WAIT_TIME = 10000L;
private volatile long counter;
private final BlobType btype;
@@ -78,12 +87,12 @@
}
}
}
protected void runTest() {
- int iterationsCount =
- Integer.getInteger("jdk.test.lib.iterations", 1);
+ int iterationsCount
+ = Integer.getInteger("jdk.test.lib.iterations", 1);
MemoryPoolMXBean bean = btype.getMemoryPool();
((NotificationEmitter) ManagementFactory.getMemoryMXBean()).
addNotificationListener(this, null, null);
for (int i = 0; i < iterationsCount; i++) {
CodeCacheUtils.hitUsageThreshold(bean, btype);
< prev index next >