test/testlibrary/whitebox/sun/hotspot/code/NMethod.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff test/testlibrary/whitebox/sun/hotspot/code/NMethod.java

test/testlibrary/whitebox/sun/hotspot/code/NMethod.java

Print this page
rev 7312 : 8059624: Test task: WhiteBox API for testing segmented codecache feature
Reviewed-by:

*** 25,54 **** package sun.hotspot.code; import java.lang.reflect.Executable; import sun.hotspot.WhiteBox; ! public class NMethod { private static final WhiteBox wb = WhiteBox.getWhiteBox(); public static NMethod get(Executable method, boolean isOsr) { Object[] obj = wb.getNMethod(method, isOsr); return obj == null ? null : new NMethod(obj); } private NMethod(Object[] obj) { ! assert obj.length == 3; ! comp_level = (Integer) obj[0]; ! insts = (byte[]) obj[1]; ! compile_id = (Integer) obj[2]; } ! public byte[] insts; ! public int comp_level; ! public int compile_id; @Override public String toString() { ! return "NMethod{" + ! "insts=" + insts + ! ", comp_level=" + comp_level + ! ", compile_id=" + compile_id + ! '}'; } } --- 25,56 ---- package sun.hotspot.code; import java.lang.reflect.Executable; import sun.hotspot.WhiteBox; ! public class NMethod extends CodeBlob { private static final WhiteBox wb = WhiteBox.getWhiteBox(); public static NMethod get(Executable method, boolean isOsr) { Object[] obj = wb.getNMethod(method, isOsr); return obj == null ? null : new NMethod(obj); } private NMethod(Object[] obj) { ! super((Object[])obj[0]); ! assert obj.length == 4; ! comp_level = (Integer) obj[1]; ! insts = (byte[]) obj[2]; ! compile_id = (Integer) obj[3]; } ! public final byte[] insts; ! public final int comp_level; ! public final int compile_id; @Override public String toString() { ! return "NMethod{" ! + super.toString() ! + ", insts=" + insts ! + ", comp_level=" + comp_level ! + ", compile_id=" + compile_id ! + '}'; } }
test/testlibrary/whitebox/sun/hotspot/code/NMethod.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File