- Main Page
- Modules
- Classes

- Search for |

# CONTROLLER_LENGTH
[CONTROLLER]

## Classes

class | INSTLIB::CONTROL_LENGTH

## Functions

INT32 | INSTLIB::CONTROL_LENGTH::Activate (CONTROL_HANDLER ch, VOID *val, BOOL passContext)
VOID | INSTLIB::CONTROL_LENGTH::Event (CONTROL_EVENT ev)

## Detailed Description

Controller for detecting the end of an interval using instruction count Use -length <n> to capture n instructions

It is the tool's responsibility to take care of interval overlapping when using the control classes with multiple threads. If the knobs controlling which thread id to use are not specified, the default behavior is to monitor events on a per thread basis. For instance, if -skip N -length M is passed, each thread will generate a start event after executing N instructions and a stop event after executing M instructions. If these intervals overlap in time, the tool writer has to make sure to handle it appropriately. The same applies for the other controllers

## Function Documentation

INT32 INSTLIB::CONTROL_LENGTH::Activate | ( | CONTROL_HANDLER | ch,
|  | VOID * | val,
|  | BOOL | passContext
| ) | `[inline, inherited]`

| Activate the controller if the -length knob is provided

Returns:
  1 if controller can start an interval, otherwise 0

VOID INSTLIB::CONTROL_LENGTH::Event | ( | CONTROL_EVENT | ev | ) | `[inline, inherited]`

| Notify the controller about a start event. It counts instructions until the end of the interval