Instrumentation for counting instruction execution
◆ mode
The mode used for counting REP prefixed instructions.
Enumerator |
---|
ModeNormal | Count all instructions, each REP "iteration" adds 1
|
ModeBoth | Provide both the normal count and a count in which REP prefixed instructions are only counted once.
|
◆ Activate()
Activate the counter, must be called before PIN_StartProgram.
- Parameters
-
[in] | mode | Determine the way in which REP prefixed operations are counted. By default (ICOUNT::ModeNormal), REP prefixed instructions are counted as if REP is an implicit loop. By passing ICOUNT::ModeRepsCountedOnlyOnce you can have the counter treat each REP as only one dynamic instruction. |
◆ Count()
UINT64 INSTLIB::ICOUNT::Count |
( |
THREADID |
tid = 0 | ) |
const |
|
inline |
- Returns
- Total number of instructions executed. (But see mode for what this means).
◆ Mode()
mode INSTLIB::ICOUNT::Mode |
( |
| ) |
const |
|
inline |
- Returns
- the mode of the ICOUNT object.
◆ SetCount()
VOID INSTLIB::ICOUNT::SetCount |
( |
UINT64 |
count, |
|
|
THREADID |
tid = 0 |
|
) |
| |
|
inline |