--- old/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorFrequentTest.java 2017-10-06 14:50:52.218501923 -0700 +++ new/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorFrequentTest.java 2017-10-06 14:50:51.838503201 -0700 @@ -31,8 +31,6 @@ * @run main/othervm/native -agentlib:HeapMonitor MyPackage.HeapMonitorFrequentTest */ -import java.io.PrintStream; - public class HeapMonitorFrequentTest { static { @@ -46,14 +44,12 @@ } } - native static int checkFrequentFrames(Frame[] frames); - native static int enableSampling(); + private native static int checkFrequentFrames(Frame[] frames); + private native static int enableSampling(); - public static int cnt; - public static int g_tmp[]; - public int array[]; + private static int g_tmp[]; - public static int helper() { + private static int helper() { int sum = 0; // Let us assume that the array is 24 bytes of memory. for (int i = 0; i < 127000 / 6; i++) { @@ -65,7 +61,7 @@ return sum; } - public static void runner(int max) { + private static void runner(int max) { int sum = 0; for (int j = 0; j < max; j++) { sum += helper();