osDpGetCounters osDpGetCounters (function)

Gets internal performance counters from the display processor

Syntax

#include <ultra64.h>     /* ultra64.h */

void osDpGetCounters(u32 *array);

Description

This routine returns the values of four internal performance counters from the display processor (DP). The array argument must point to a buffer that is large enough to hold four 32-bit values. The first element of array is CLOCK counter. This counter is incremented by the free running RCP clock. For NTSC systems, this counter increments at 60.85 Mhz and each counter tick represents approximately 16.43 nanoseconds. The second element is CMC counter. This counter is incremented once every clock cycle when the RDP has work to do. The RSP places RDP commands in a FIFO for execution. If this FIFO is not empty, the counter is incremented. The third element is PIPE counter. This counter is incremented when the internal RDP pipeline is not stalled while waiting for memory accesses to occur. The last element is TMEM counter. This counter is incremented when the texture memory is being loaded.

The counters can be individually cleared by calling the osDpSetStatus function and using these status bits that include DPC_CLR_TMEM_CTR, DPC_CLR_PIPE_CTR, DPC_CLR_CMD_CTR, and DPC_CLR_CLOCK_CTR.

See Also

osDpSetStatus

Revision History

1999/04/30 Changed Format