public void instructionExecuted(JVM vm) {
    ThreadInfo ti = vm.getLastThreadInfo();
    Instruction insn = vm.getLastInstruction();

    if (insn instanceof VirtualInvocation) {

      if (vm.getNextInstruction() != insn) { // otherwise we didn't execute
        VirtualInvocation call = (VirtualInvocation) insn;
        int ref = call.getCalleeThis(ti);
        Record rec = getRecord(ref);

        if (rec != null) {
          MethodInfo mi = call.getInvokedMethod(ti, ref);

          if (logCall) {
            log(ti, "invoke %1$s.%2$s", rec.ei, mi.getUniqueName());
          }

          if (!checkShared(rec, ti, mi, insn)) {
            return;
          }
        }
      }

    } else if (insn instanceof PUTFIELD) {
      PUTFIELD storeInsn = (PUTFIELD) insn;
      int ref = storeInsn.getLastThis();
      Record rec = getRecord(ref);

      if (rec != null) {
        FieldInfo fi = storeInsn.getFieldInfo();

        if (logPut) {
          log(ti, "put %1$s.%2$s = <%3$d>", rec.ei, fi.getName(), storeInsn.getLastValue());
        }

        if (!checkShared(rec, ti, fi, insn)) {
          return;
        }

        if (!checkConst(rec, ti, fi, insn)) {
          return;
        }
      }
    }
  }
 MethodCoverage(MethodInfo mi) {
   this.mi = mi;
   log.info("add method: " + mi.getUniqueName());
 }