4.10.5. ARMul_AddCounterDesc

The ARMul_AddCounterDesc() function adds new counters to $statistics.

Syntax


int ARMul_AddCounterDesc(void *handle, ARMword *arg1, ARMword *arg2,                         const char *name)

where:

handle

is no longer used.

arg1/arg2

are the arguments passed to the UnkRDIInfoUpcall().

name

is a string that names the statistic counter. The string must be less than 32 characters long.

Return

The function returns one of:

  • RDIError_BufferFull

  • RDIError_UnimplementedMessage.

Usage

When ARMulator receives an RDIRequestCycleDesc() call from the debugger, it uses the UnkRDIInfoUpcall() (see Unknown RDI information handler) to ask each module in turn if it wishes to provide any statistics counters. Each module responds by calling ARMul_AddCounterDesc() with the arguments passed to the UnkRDIInfoUpcall().

All statistics counters must be either a 32-bit or 64-bit word, and be monotonically increasing. That is, the statistic value must go up over time. This is a requirement because of the way the debugger calculates $statistics_inc.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI0058D
Non-Confidential