Typedefs | |
typedef VOID(* | LEVEL_PINCLIENT::INS_INSTRUMENT_CALLBACK )(INS ins, VOID *v) |
Functions | |
PIN_CALLBACK | LEVEL_PINCLIENT::INS_AddInstrumentFunction (INS_INSTRUMENT_CALLBACK fun, VOID *val) |
VOID | LEVEL_PINCLIENT::INS_InsertPredicatedCall (INS ins, IPOINT ipoint, AFUNPTR funptr,...) |
VOID | LEVEL_PINCLIENT::INS_InsertCall (INS ins, IPOINT action, AFUNPTR funptr,...) |
VOID | LEVEL_PINCLIENT::INS_InsertIfCall (INS ins, IPOINT action, AFUNPTR funptr,...) |
VOID | LEVEL_PINCLIENT::INS_InsertThenCall (INS ins, IPOINT action, AFUNPTR funptr,...) |
VOID | LEVEL_PINCLIENT::INS_InsertIfPredicatedCall (INS ins, IPOINT action, AFUNPTR funptr,...) |
VOID | LEVEL_PINCLIENT::INS_InsertThenPredicatedCall (INS ins, IPOINT action, AFUNPTR funptr,...) |
VOID | LEVEL_PINCLIENT::INS_InsertFillBuffer (INS ins, IPOINT action, BUFFER_ID id,...) |
VOID | LEVEL_PINCLIENT::INS_InsertFillBufferPredicated (INS ins, IPOINT action, BUFFER_ID id,...) |
VOID | LEVEL_PINCLIENT::INS_InsertFillBufferThen (INS ins, IPOINT action, BUFFER_ID id,...) |
|
Call back function used to instrument instructions |
|
Add a function used to instrument at instruction granularity
|
|
Insert a call to funptr relative to instruction ins.
|
|
Insert analysis code to fill one record in a trace buffer whenever an application instruction executes.
|
|
Insert analysis code to fill one record in a trace buffer whenever an application instruction executes, based on that instruction's predicate.
|
|
Insert analysis code to fill one record in a trace buffer whenever an application instruction executes. The record is only inserted if the preceding "if" analysis call returns a non-zero value.
|
|
Insert a call to funptr relative to an INS. If funptr returns a non-zero ADDRINT, then the immediately following "then" analysis call is executed.
|
|
Insert a call to funptr relative to an INS. If funptr returns a non-zero ADDRINT and the instruction has a true predicate, then the immediately following "then" analysis call is executed. If the instruction is not predicated, then this function is identical to INS_InsertIfCall. Note that funptr may be called even if the predicate is false, the predicate is only defined to guard the execution of the following THEN function. (So if the function inserted here modifies the machine state it might affect the value of the predicate. Best practice is not to modify machine state here!) On IA32 and Intel64, the sequences INS_InsertIfCall(...); INS_InsertThenPredicatedCall(...); INS_InsertIfPredicatedCall(...); INS_InsertThenCall(...); produce identical results. They all generate code which can be represented like this if (UsersIfFunction(...)) if (predicate) UsersThenFunction(...); This means that on IA32 and Intel64 the user's IF code is always called, however on these architectures that is very likely to generate faster code, since predicated instructions are rare. The dynamically most important predicated instructions are almost certainly REP MOVS, which have a very low (~80ppm) probablity of being predicated false. Unless the user's IF code is very large, or has a lower probability of filtering the execution, it is always better to use the test of the user condition to prevent execution of the predicate test. Of course, the code included in a user IF call is expected to be small, since the objective of INS_InsertIfCall, INS_InsertThenCall is to allow the code in the IF to be inlined. If you need to know the instruction predicate inside the IF call, you should pass IARG_EXECUTING as an argument and test it.
|
|
See INS_InsertCall. When the instruction has a predicate and the predicate is false, the analysis function is not called. On the IA-32 and Intel 64 architectures the only instructions treated as predicated are CMOVcc, FCMOVcc and REPped string ops. For the conditional moves, the predicate is based on the condition codes tested by the instruction. For the REPped string ops the predicate is that the execution count is not zero. For all other instructions the predicate is always true, so INS_InsertPredicatedCall is identical to INS_InsertCall. If you want to test both your own condition, and the predicate, you can use INS_InsertThenPredicatedCall, or use IARG_EXECUTING to pass the predicate value to an INS_InsertIfCall. If more than one call is inserted for the same instruction, the order is determined by IARG_CALL_ORDER. For more information, see CALL_ORDER.
|
|
Insert a call to funptr relative to an INS. The function is called only if the immediately preceding "if" analysis call returns a non-zero value.
|
|
Insert a call to funptr relative to an INS. The function is called only if the immediately preceding "if" analysis call returns a non-zero value and the instruction's predicate is true. See INS_InsertIfPredicatedCall for details of the semantics of mixing INS_InsertThenPredicatedCall with INS_InsertIfCall (and all the other possibilities).
|