#include <revolution/gx.h>
void GXReadMemMetric( u32* cp_req,
u32* tc_req,
u32* cpu_rd_req,
u32* cpu_wr_req,
u32* dsp_req,
u32* io_req,
u32* vi_req,
u32* pe_req,
u32* rf_req,
u32* fi_req );
| cp_req | Returns a CP request counter value as a 32-bit unsigned integer. |
|---|---|
| tc_req | Returns a TC request counter value as a 32-bit unsigned integer. |
| cpu_rd_req | Returns a CPU read request counter value as a 32-bit unsigned integer. |
| cpu_wr_req | Returns a CPU write request counter value as a 32-bit unsigned integer. |
| dsp_req | Returns a DPS request counter value as a 32-bit unsigned integer. |
| io_req | Returns an IO request counter value as a 32-bit unsigned integer. |
| vi_req | Returns a VI request counter value as a 32-bit unsigned integer. |
| pe_req | Returns a PE request counter value as a 32-bit unsigned integer. |
| rf_req | Returns an RF request counter value as a 32-bit unsigned integer. |
| fi_req | Returns an FI request counter value as a 32-bit unsigned integer. |
None.
The graphics processor (GP) can count many internal events that give detailed information on performance. This function returns the number of memory requests made by each memory master. The counters can be cleared by calling the GXClearMemMetric function.
Note: This function can measure only access to internal memory (MEM1 region) of the system. It cannot measure access to external memory (MEM2 region).
u32 cp_req, tc_req, cpu_rd_req, cpu_wr_req, dsp_req, io_req, vi_req, pe_req;
u32 rf_req, fi_req;
GXClearMemMetric();
// 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 );
OSReport("Number command processor requests: %d\n", cp_req);Each request results in a 32-byte transaction on the main memory bus.
The command processor (CP) is responsible for reading the graphics FIFO, reading display lists (in the GXCallDisplayList function), and servicing vertex cache misses. This metric returns the number of memory read requests issued by the command processor.
Returns the number of memory read requests issued by the texture cache (TC).
Returns the number of memory read requests made by the CPU.
Returns the number of memory write requests made by the CPU.
Returns the number of memory requests made by the audio DSP.
Returns the number of memory requests made by IO devices.
Returns the number of memory read requests made by the video interface (VI).
Returns the number of memory write requests made by the pixel engine (PE). These include texture copies (GXCopyTex) and display copies (GXCopyDisp).
Returns the number of memory refresh requests.
Returns the number of forced idle (FI) requests, which are dummy requests required to switch the bus direction (read to write, or write to read).
GXReadPixMetric, GXClearPixMetric, GXSetVCacheMetric, GXReadVCacheMetric, GXClearVCacheMetric, GXSetGPMetric, GXReadGPMetric, GXClearGPMetric
2006/03/01 Initial version.
CONFIDENTIAL