- Main Page
- Modules
- Classes

- Search for |

# ICOUNT

## Classes

class | INSTLIB::ICOUNT

## Enumerations

enum | INSTLIB::ICOUNT::mode { ModeInactive = -1, INSTLIB::ICOUNT::ModeNormal = 0, INSTLIB::ICOUNT::ModeBoth }

## Functions

UINT64 | INSTLIB::ICOUNT::Count (THREADID tid=0) const
VOID | INSTLIB::ICOUNT::SetCount (UINT64 count, THREADID tid=0)
mode | INSTLIB::ICOUNT::Mode () const
VOID | INSTLIB::ICOUNT::Activate (mode m=ModeNormal)

## Detailed Description

Instrumentation for counting instruction execution

## Enumeration Type Documentation

enum INSTLIB::ICOUNT::mode`[inherited]`

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

## Function Documentation

VOID INSTLIB::ICOUNT::Activate | ( | mode | m = `ModeNormal` | ) | `[inline, inherited]`

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

UINT64 INSTLIB::ICOUNT::Count | ( | THREADID | tid = `0` | ) | const`[inline, inherited]`

Returns:
  Total number of instructions executed. (But see mode for what this means).

mode INSTLIB::ICOUNT::Mode | ( |  | ) | const`[inline, inherited]`

Returns:
  the mode of the ICOUNT object.

VOID INSTLIB::ICOUNT::SetCount | ( | UINT64 | count,
|  | THREADID | tid = `0`
| ) | `[inline, inherited]`

| Set the current count