GXClearMemMetric

C Specification

#include <revolution/gx.h>
void GXClearMemMetric( void  );

Arguments

None

Return Values

None

Description

The Graphics Processor (GP) can count many internal events that give detailed information on performance. This function clears the memory request counters. The counters can be read by calling GXReadMemMetric. Since the counters are cleared by writing CPU-accessible registers, this function should not be used in a display list.

u32 cp_req, tc_req, cpu_rd_req, cpu_wr_req, dsp_req, io_req, vi_req, pe_req;
u32 rf_req, fi_req;

GXReadClearMetric();

// Draw Object(s)

// wait until object drawn
GXSetDrawSync(0xbeef);
while (0xbeef != GXReadDrawSync())
    ;

metric = GXReadMemMetric(&cp_req,
                         &tc_req,
                         &cpu_rd_req,
                         &cpu_wr_req,
                         &dsp_req,
                         &io_req,
                         &vi_req,
                         &pe_req,
                         &rf_req,
                         &fi_req );   // returns request counter

OSReport("Number command processor requests:  %d\n", cp_req);

See Also

GXReadPixMetric
GXClearPixMetric
GXSetVCacheMetric
GXReadVCacheMetric
GXClearVCacheMetric
GXSetGPMetric
GXReadGPMetric
GXClearGPMetric

Revision History

03/01/2006 Initial version