Example:Instruction Counting Tool #include "pin.h" UINT64 icount 0; void docount ()icount++; Execution time routine void Instruction(INS ins,void *v) Jitting time routine:Pin CallBack INS InsertCall(ins,IPOINT BEFORE, (AFUNPTR)docount,IARG END); void Fini(INT32 code,void *v) std::cerr <"Count "<icount <endl; int main(int argc,char argv[]) PIN Init (argc,argv); INS AddInstrumentFunction(Instruction,0); PIN AddFiniFunction(Fini,0); PIN StartProgram();//Never returns return 0; 10Example: Instruction Counting Tool 10