Instrumentation API
[INS: Instruction Object]


Typedefs

typedef VOID(* LEVEL_PINCLIENT::INS_INSTRUMENT_CALLBACK )(INS ins, VOID *v)

Functions

VOID 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,...)

Detailed Description

Use these functions to instrument instructions.

Typedef Documentation

typedef VOID(* LEVEL_PINCLIENT::INS_INSTRUMENT_CALLBACK)(INS ins, VOID *v)
 

Call back function used to instrument instructions


Function Documentation

VOID LEVEL_PINCLIENT::INS_AddInstrumentFunction INS_INSTRUMENT_CALLBACK  fun,
VOID *  val
 

Add a function used to instrument at instruction granularity

Parameters:
fun Instrumentation function for instructions
val passed as the second argument to the instrumentation function

VOID LEVEL_PINCLIENT::INS_InsertCall INS  ins,
IPOINT  action,
AFUNPTR  funptr,
  ...
 

Insert a call to funptr relative to instruction ins.

Parameters:
ins Instruction to instrument
action Specifies before, after, etc.
IPOINT_BEFORE is always valid for all instructions.
IPOINT_AFTER is valid only when a fall-through exists (e.g. Calls and unconditional branches will fail).
IPOINT_TAKEN_BRANCH is invalid for non-branches.
funptr Insert a all to funptr
... List of arguments to pass funptr. See IARG_TYPE, terminated with IARG_END

VOID LEVEL_PINCLIENT::INS_InsertIfCall INS  ins,
IPOINT  action,
AFUNPTR  funptr,
  ...
 

Insert a call to funptr relative to instruction ins and pass the result to the immediate following "then" analysis call.

Parameters:
ins Instruction to instrument
action Specifies before, after, etc.
IPOINT_BEFORE is always valid for all instructions.
IPOINT_AFTER is valid only when a fall-through exists (e.g. Calls and unconditional branches will fail).
IPOINT_TAKEN_BRANCH is invalid for non-branches.
funptr Insert a all to funptr
... List of arguments to pass funptr. See IARG_TYPE, terminated with IARG_END

VOID LEVEL_PINCLIENT::INS_InsertIfPredicatedCall INS  ins,
IPOINT  action,
AFUNPTR  funptr,
  ...
 

Insert a call to funptr relative to instruction ins and pass the result to the immediate
following "then" analysis call and if the function has a predicate, it is true.

Parameters:
ins Instruction to instrument
action Specifies before, after, etc.
IPOINT_BEFORE is always valid for all instructions.
IPOINT_AFTER is valid only when a fall-through exists (e.g. Calls and unconditional branches will fail).
IPOINT_TAKEN_BRANCH is invalid for non-branches.
funptr Insert a all to funptr
... List of arguments to pass funptr. See IARG_TYPE, terminated with IARG_END

VOID LEVEL_PINCLIENT::INS_InsertPredicatedCall INS  ins,
IPOINT  ipoint,
AFUNPTR  funptr,
  ...
 

See INS_InsertCall. When the function has a predicate and the predicate is false, the analysis function is not called.

VOID LEVEL_PINCLIENT::INS_InsertThenCall INS  ins,
IPOINT  action,
AFUNPTR  funptr,
  ...
 

Insert a call to funptr relative to instruction ins, which will be invoked only if the immediate preceeding "if" analysis call returns a non-zero value.

Parameters:
ins Instruction to instrument
action Specifies before, after, etc.
IPOINT_BEFORE is always valid for all instructions.
IPOINT_AFTER is valid only when a fall-through exists (e.g. Calls and unconditional branches will fail).
IPOINT_TAKEN_BRANCH is invalid for non-branches.
funptr Insert a all to funptr
... List of arguments to pass funptr. See IARG_TYPE, terminated with IARG_END

VOID LEVEL_PINCLIENT::INS_InsertThenPredicatedCall INS  ins,
IPOINT  action,
AFUNPTR  funptr,
  ...
 

Insert a call to funptr relative to instruction ins, which will be invoked only if the immediate preceeding "if" analysis call returns a non-zero value and if the function has a predicate, it is true

Parameters:
ins Instruction to instrument
action Specifies before, after, etc.
IPOINT_BEFORE is always valid for all instructions.
IPOINT_AFTER is valid only when a fall-through exists (e.g. Calls and unconditional branches will fail).
IPOINT_TAKEN_BRANCH is invalid for non-branches.
funptr Insert a all to funptr
... List of arguments to pass funptr. See IARG_TYPE, terminated with IARG_END


Generated on Tue Jan 16 00:09:08 2007 for Pin by  doxygen 1.4.6