51 * @modules java.base/jdk.internal.misc
52 * jdk.hotspot.agent/sun.jvm.hotspot
53 * jdk.hotspot.agent/sun.jvm.hotspot.utilities
54 * jdk.hotspot.agent/sun.jvm.hotspot.oops
55 * jdk.hotspot.agent/sun.jvm.hotspot.debugger
56 * @build jdk.test.whitebox.WhiteBox
57 * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
58 * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. TestInstanceKlassSize
59 */
60
61 import jdk.test.whitebox.WhiteBox;
62
63 public class TestInstanceKlassSize {
64
65 public static WhiteBox wb = WhiteBox.getWhiteBox();
66 private static String[] SAInstanceKlassNames = new String[] {
67 "java.lang.Object",
68 "java.util.ArrayList",
69 "java.lang.String",
70 "java.lang.Thread",
71 "java.lang.Byte"
72 };
73
74 private static void startMeWithArgs() throws Exception {
75
76 LingeredApp app = null;
77 OutputAnalyzer output = null;
78 try {
79 app = LingeredApp.startApp("-XX:+UsePerfData");
80 System.out.println ("Started LingeredApp with pid " + app.getPid());
81 } catch (Exception ex) {
82 ex.printStackTrace();
83 throw new RuntimeException(ex);
84 }
85 try {
86 // Run this app with the LingeredApp PID to get SA output from the LingeredApp
87 ProcessBuilder processBuilder = ProcessTools.createLimitedTestJavaProcessBuilder(
88 "--add-modules=jdk.hotspot.agent",
89 "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot=ALL-UNNAMED",
90 "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot.utilities=ALL-UNNAMED",
91 "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot.oops=ALL-UNNAMED",
|
51 * @modules java.base/jdk.internal.misc
52 * jdk.hotspot.agent/sun.jvm.hotspot
53 * jdk.hotspot.agent/sun.jvm.hotspot.utilities
54 * jdk.hotspot.agent/sun.jvm.hotspot.oops
55 * jdk.hotspot.agent/sun.jvm.hotspot.debugger
56 * @build jdk.test.whitebox.WhiteBox
57 * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
58 * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. TestInstanceKlassSize
59 */
60
61 import jdk.test.whitebox.WhiteBox;
62
63 public class TestInstanceKlassSize {
64
65 public static WhiteBox wb = WhiteBox.getWhiteBox();
66 private static String[] SAInstanceKlassNames = new String[] {
67 "java.lang.Object",
68 "java.util.ArrayList",
69 "java.lang.String",
70 "java.lang.Thread",
71 };
72
73 private static void startMeWithArgs() throws Exception {
74
75 LingeredApp app = null;
76 OutputAnalyzer output = null;
77 try {
78 app = LingeredApp.startApp("-XX:+UsePerfData");
79 System.out.println ("Started LingeredApp with pid " + app.getPid());
80 } catch (Exception ex) {
81 ex.printStackTrace();
82 throw new RuntimeException(ex);
83 }
84 try {
85 // Run this app with the LingeredApp PID to get SA output from the LingeredApp
86 ProcessBuilder processBuilder = ProcessTools.createLimitedTestJavaProcessBuilder(
87 "--add-modules=jdk.hotspot.agent",
88 "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot=ALL-UNNAMED",
89 "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot.utilities=ALL-UNNAMED",
90 "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot.oops=ALL-UNNAMED",
|