public class O { private static final String TAG = "O"; public int method1(int i) { Log.d(TAG, "method1() called with: i = [" + i + "]"); return i * i; } }
public class O { private static final String TAG = "O"; public static volatile MethodMonitor s_Monitor_1;
public int method1(int i) { //方法开始 int methodId = 11; Point point = null; if (s_Monitor_1 != null && s_Monitor_1.hotMethodEnter(methodId)) { point = new Point(); point.setThisObject(this); Object[] var2 = new Object[0]; point.setArg(var2); s_Monitor_1.methodEnter(point); }
//原有方法执行 Log.d(TAG, "method1() called with: i = [" + i + "]"); int result = i * i;
//方法结束 if (s_Monitor_1 != null && s_Monitor_1.hotMethodReturn(0)) { if (point == null) { point = new Point(); point.setThisObject(this); Object[] var3 = new Object[0]; point.setArg(var3); }