12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 import sun.jvm.hotspot.HotSpotAgent; 25 import sun.jvm.hotspot.utilities.SystemDictionaryHelper; 26 import sun.jvm.hotspot.oops.InstanceKlass; 27 import sun.jvm.hotspot.debugger.*; 28 29 import jdk.test.lib.JDKToolLauncher; 30 import jdk.test.lib.JDKToolFinder; 31 import jdk.test.lib.Platform; 32 import jdk.test.lib.ProcessTools; 33 import jdk.test.lib.OutputAnalyzer; 34 import jdk.test.lib.Utils; 35 import jdk.test.lib.Asserts; 36 37 /* 38 * @test 39 * @library /test/lib/share/classes 40 * @library /testlibrary 41 * @build jdk.test.lib.* 42 * @build jdk.test.lib.apps.* 43 * @modules java.base/jdk.internal.misc 44 * @modules jdk.hotspot.agent 45 * @modules jdk.hotspot.agent/sun.jvm.hotspot 46 * @modules jdk.hotspot.agent/sun.jvm.hotspot.utilities 47 * @modules jdk.hotspot.agent/sun.jvm.hotspot.oops 48 * @compile -XDignore.symbol.file=true -Xmodule:jdk.hotspot.agent TestInstanceKlassSizeForInterface.java 49 * @run main/othervm TestInstanceKlassSizeForInterface 50 */ 51 52 interface Language { 53 static final long nbrOfWords = 99999; 54 public abstract long getNbrOfWords(); 55 } 56 57 class ParselTongue implements Language { 58 public long getNbrOfWords() { 59 return nbrOfWords * 4; 60 } 61 } 62 63 public class TestInstanceKlassSizeForInterface { 64 65 private static void SAInstanceKlassSize(int pid, 66 String[] instanceKlassNames) { 67 68 HotSpotAgent agent = new HotSpotAgent(); | 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 import sun.jvm.hotspot.HotSpotAgent; 25 import sun.jvm.hotspot.utilities.SystemDictionaryHelper; 26 import sun.jvm.hotspot.oops.InstanceKlass; 27 import sun.jvm.hotspot.debugger.*; 28 29 import jdk.test.lib.JDKToolLauncher; 30 import jdk.test.lib.JDKToolFinder; 31 import jdk.test.lib.Platform; 32 import jdk.test.lib.process.ProcessTools; 33 import jdk.test.lib.process.OutputAnalyzer; 34 import jdk.test.lib.Utils; 35 import jdk.test.lib.Asserts; 36 37 /* 38 * @test 39 * @library /test/lib 40 * @modules java.base/jdk.internal.misc 41 * @modules jdk.hotspot.agent 42 * @modules jdk.hotspot.agent/sun.jvm.hotspot 43 * @modules jdk.hotspot.agent/sun.jvm.hotspot.utilities 44 * @modules jdk.hotspot.agent/sun.jvm.hotspot.oops 45 * @compile -XDignore.symbol.file=true -Xmodule:jdk.hotspot.agent 46 * -XaddExports:java.base/jdk.internal.misc=jdk.hotspot.agent 47 * -XaddExports:java.management/java.lang.management=jdk.hotspot.agent 48 * TestInstanceKlassSizeForInterface.java 49 * @run main/othervm TestInstanceKlassSizeForInterface 50 */ 51 52 interface Language { 53 static final long nbrOfWords = 99999; 54 public abstract long getNbrOfWords(); 55 } 56 57 class ParselTongue implements Language { 58 public long getNbrOfWords() { 59 return nbrOfWords * 4; 60 } 61 } 62 63 public class TestInstanceKlassSizeForInterface { 64 65 private static void SAInstanceKlassSize(int pid, 66 String[] instanceKlassNames) { 67 68 HotSpotAgent agent = new HotSpotAgent(); |