00001
00002
00003
00004
00005
00006
00007
00008 package sun.tools.hprof;
00009
00010
00011
00012
00013
00014
00015
00016
00017 public class Tracker {
00018
00019
00020
00021 private static int engaged = 0;
00022
00023
00024
00025
00026
00027
00028
00029 private static native void nativeObjectInit(Object thr, Object obj);
00030
00031 public static void ObjectInit(Object obj)
00032 {
00033 if ( engaged != 0 ) {
00034 nativeObjectInit(Thread.currentThread(), obj);
00035 }
00036 }
00037
00038
00039
00040
00041
00042 private static native void nativeNewArray(Object thr, Object obj);
00043
00044 public static void NewArray(Object obj)
00045 {
00046 if ( engaged != 0 ) {
00047 nativeNewArray(Thread.currentThread(), obj);
00048 }
00049 }
00050
00051
00052
00053
00054
00055
00056
00057 private static native void nativeCallSite(Object thr, int cnum, int mnum);
00058
00059 public static void CallSite(int cnum, int mnum)
00060 {
00061 if ( engaged != 0 ) {
00062 nativeCallSite(Thread.currentThread(), cnum, mnum);
00063 }
00064 }
00065
00066
00067
00068
00069
00070 private static native void nativeReturnSite(Object thr, int cnum, int mnum);
00071
00072 public static void ReturnSite(int cnum, int mnum)
00073 {
00074 if ( engaged != 0 ) {
00075 nativeReturnSite(Thread.currentThread(), cnum, mnum);
00076 }
00077 }
00078
00079 }
00080