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

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
Availability:
Mode: JIT
O/S: Linux, Windows & MacOS
CPU: All

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 call to funptr
... List of arguments to pass funptr. See IARG_TYPE, terminated with IARG_END
If more than 1 call is inserted for the same instruction, then the order is determined by IARG_PRIORITY. If priorities are equal, then order is determined by the order that they are inserted.

Availability:
Mode: JIT
O/S: Linux, Windows & MacOS
CPU: All

VOID LEVEL_PINCLIENT::INS_InsertFillBuffer INS  ins,
IPOINT  action,
BUFFER_ID  id,
  ...
 

Insert analysis code to fill one record in a trace buffer whenever an application instruction executes.

Parameters:
[in] ins The application instruction.
[in] action Tells whether the record is filled before or after the instruction.
[in] id The ID of the buffer whose record is filled.
[in] ... Additional arguments to specify the fields of the trace buffer. These additional arguments take the form: IARG_TYPE arg, [optional IARG parameters], size_t offset, ..., IARG_END The arg argument specifies the value to write to the trace record field. The offset argument specifies the offset (in bytes) from the start of the trace record to this field. Typically, you would use "offsetof()" for this. if arg requires additional parameters, they come before offset.
Availability:
Mode: JIT
O/S: Linux & Windows
CPU: IA-32 and Intel(R) 64 architectures

VOID LEVEL_PINCLIENT::INS_InsertFillBufferPredicated INS  ins,
IPOINT  action,
BUFFER_ID  id,
  ...
 

Insert analysis code to fill one record in a trace buffer whenever an application instruction executes, based on that instruction's predicate.

Parameters:
[in] ins The application instruction
[in] action Whether the record is filled before or after the instruction
[in] id The ID of the buffer whose record is filled
[in] ... Additional arguments to specify the fields of the trace buffer.
Availability:
Mode: JIT
O/S: Linux & Windows
CPU: IA-32 and Intel(R) 64 architectures

VOID LEVEL_PINCLIENT::INS_InsertFillBufferThen INS  ins,
IPOINT  action,
BUFFER_ID  id,
  ...
 

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.

Parameters:
[in] ins The application instruction
[in] action Whether the record is filled before or after the instruction
[in] id The ID of the buffer whose record is to filled
[in] ... Additional arguments to specify the fields of the trace buffer.
Availability:
Mode: JIT
O/S: Linux & Windows
CPU: IA-32 and Intel(R) 64 architectures

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

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.

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 call to funptr. Its return type must be ADDRINT
... List of arguments to pass funptr. See IARG_TYPE, terminated with IARG_END
Availability:
Mode: JIT
O/S: Linux, Windows & MacOS
CPU: All

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

Insert a call to funptr relative to an INS. If funptr returns a non-zero ADDRINT and the function has a true predicate (or is not predicated), then the immediately following "then" analysis call is executed.

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 call to funptr. Its return type must be ADDRINT
... List of arguments to pass funptr. See IARG_TYPE, terminated with IARG_END
Availability:
Mode: JIT
O/S: Linux, Windows & MacOS
CPU: All

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

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

Availability:
Mode: JIT
O/S: Linux, Windows & MacOS
CPU: All

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

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.

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 call to funptr
... List of arguments to pass funptr. See IARG_TYPE, terminated with IARG_END
Availability:
Mode: JIT
O/S: Linux, Windows & MacOS
CPU: All

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

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.

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 call to funptr
... List of arguments to pass funptr. See IARG_TYPE, terminated with IARG_END
Availability:
Mode: JIT
O/S: Linux, Windows & MacOS
CPU: All


Generated on Thu Jun 18 03:16:16 2009 for Pin by  doxygen 1.4.6