public void instrument_method(Method m,MethodGen mg){
  InstructionList il=mg.getInstructionList();
  for (InstructionHandle ih=il.getStart(); ih != null; ) {
    if (debug_instrument_inst.enabled()) {
      debug_instrument_inst.log("instrumenting instruction %s%n",ih);
    }
    InstructionHandle next_ih=ih.getNext();
    InstructionList new_il=xform_inst(mg,ih.getInstruction());
    if (debug_instrument_inst.enabled())     debug_instrument_inst.log("  new inst: %s%n",new_il);
    replace_instructions(il,ih,new_il);
    ih=next_ih;
  }
}

public void instrument_method ( Method m , MethodGen mg ) { InstructionList il = mg . getInstructionList ( ) ; for ( InstructionHandle ih = il . getStart ( ) ; ih != null ; ) { if ( debug_instrument_inst . enabled ( ) ) { debug_instrument_inst . log ( "instrumenting instruction %s%n" , ih ) ; } InstructionHandle next_ih = ih . getNext ( ) ; InstructionList new_il = xform_inst ( mg , ih . getInstruction ( ) ) ; if ( debug_instrument_inst . enabled ( ) ) debug_instrument_inst . log ( "  new inst: %s%n" , new_il ) ; replace_instructions ( il , ih , new_il ) ; ih = next_ih ; } }
instrument the specified method to replace mapped calls .
