1 7 8 package sun.tools.hprof; 9 10 16 17 public class Tracker { 18 19 20 21 private static int engaged = 0; 22 23 24 25 28 29 private static native void nativeObjectInit(Object thr, Object obj); 30 31 public static void ObjectInit(Object obj) 32 { 33 if ( engaged != 0 ) { 34 nativeObjectInit(Thread.currentThread(), obj); 35 } 36 } 37 38 41 42 private static native void nativeNewArray(Object thr, Object obj); 43 44 public static void NewArray(Object obj) 45 { 46 if ( engaged != 0 ) { 47 nativeNewArray(Thread.currentThread(), obj); 48 } 49 } 50 51 52 53 56 57 private static native void nativeCallSite(Object thr, int cnum, int mnum); 58 59 public static void CallSite(int cnum, int mnum) 60 { 61 if ( engaged != 0 ) { 62 nativeCallSite(Thread.currentThread(), cnum, mnum); 63 } 64 } 65 66 69 70 private static native void nativeReturnSite(Object thr, int cnum, int mnum); 71 72 public static void ReturnSite(int cnum, int mnum) 73 { 74 if ( engaged != 0 ) { 75 nativeReturnSite(Thread.currentThread(), cnum, mnum); 76 } 77 } 78 79 } 80 81 | Popular Tags |