提交 1b87b506 编写于 作者: M mchung

6687508: Update test/sun/management jtreg tests due to...

6687508: Update test/sun/management jtreg tests due to sun.management.ManagementFactory class rename
Summary: Modified the jtreg tests to use ManagementFactoryHelper instead
Reviewed-by: emcmanus
上级 bacc4af8
......@@ -37,7 +37,7 @@ import sun.management.*;
public class GetClassInitializationTime {
private static HotspotClassLoadingMBean mbean =
(HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
(HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
// Careful with these values.
private static final long MIN_TIME_FOR_PASS = 1;
......
......@@ -39,7 +39,7 @@ import sun.management.*;
public class GetClassLoadingTime {
private static HotspotClassLoadingMBean mbean =
(HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
(HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
// Careful with these values.
private static final long MIN_TIME_FOR_PASS = 1;
......
......@@ -37,7 +37,7 @@ import sun.management.*;
public class GetInitializedClassCount {
private static HotspotClassLoadingMBean mbean =
(HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
(HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
// Careful with these values.
private static final long MIN_VALUE_FOR_PASS = 1;
......
......@@ -37,7 +37,7 @@ import sun.management.*;
public class GetLoadedClassSize {
private static HotspotClassLoadingMBean mbean =
(HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
(HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
// Careful with these values.
private static final long MIN_VALUE_FOR_PASS = 1;
......
......@@ -37,7 +37,7 @@ import sun.management.*;
public class GetMethodDataSize {
private static HotspotClassLoadingMBean mbean =
(HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
(HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
// Careful with these values.
private static final long MIN_VALUE_FOR_PASS = 1;
......
......@@ -37,7 +37,7 @@ import sun.management.*;
public class GetUnloadedClassSize {
private static HotspotClassLoadingMBean mbean =
(HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
(HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
// Careful with these values.
private static final long MIN_VALUE_FOR_PASS = 0;
......
......@@ -37,7 +37,7 @@ import sun.management.*;
public class GetSafepointCount {
private static HotspotRuntimeMBean mbean =
(HotspotRuntimeMBean)ManagementFactory.getHotspotRuntimeMBean();
(HotspotRuntimeMBean)ManagementFactoryHelper.getHotspotRuntimeMBean();
private static final long NUM_THREAD_DUMPS = 5;
......
......@@ -37,7 +37,7 @@ import sun.management.*;
public class GetSafepointSyncTime {
private static HotspotRuntimeMBean mbean =
(HotspotRuntimeMBean)ManagementFactory.getHotspotRuntimeMBean();
(HotspotRuntimeMBean)ManagementFactoryHelper.getHotspotRuntimeMBean();
private static final long NUM_THREAD_DUMPS = 300;
......
......@@ -37,7 +37,7 @@ import sun.management.*;
public class GetTotalSafepointTime {
private static HotspotRuntimeMBean mbean =
(HotspotRuntimeMBean)ManagementFactory.getHotspotRuntimeMBean();
(HotspotRuntimeMBean)ManagementFactoryHelper.getHotspotRuntimeMBean();
private static final long NUM_THREAD_DUMPS = 100;
......
......@@ -32,10 +32,11 @@
import sun.management.*;
import java.util.*;
import java.lang.management.ThreadMXBean;
import java.lang.management.ManagementFactory;
public class GetInternalThreads {
private static HotspotThreadMBean mbean =
ManagementFactory.getHotspotThreadMBean();
ManagementFactoryHelper.getHotspotThreadMBean();
// Minimum number of VM internal threads
// VM thread, watcher thread, Low memory detector, compiler thread
......@@ -55,7 +56,7 @@ public class GetInternalThreads {
System.out.println("Internal Thread Count = " + value);
ThreadMXBean thread =
java.lang.management.ManagementFactory.getThreadMXBean();
ManagementFactory.getThreadMXBean();
if (!thread.isThreadCpuTimeSupported()) {
System.out.println("Thread Cpu Time is not supported.");
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册