Nio prof.rpl

From WiiUBrew
Jump to navigation Jump to search

nio_prof.rpl is the shim/wrapper library for PPC communication with the /debug/prof IOSU device node on the IOP, i.e the Wii U's IO profiler API.

Functions

Name Prototype Description
IO_ProfilerLibInit IO_PROF_RVAL IO_ProfilerLibInit(void) Initializes the IO profiler library.
IO_ProfilerLibFinish IO_PROF_RVAL IO_ProfilerLibFinish(void) Cleanup and close the IO profiler library.
IO_ProfilerStartCheckpoint IO_PROF_RVAL IO_ProfilerStartCheckpoint(u32 flags) Sets a start profiler checkpoint.
IO_ProfilerGetStatsAndEndCheckpoint IO_PROF_RVAL IO_ProfilerGetStatsAndEndCheckpoint(u32 flags, u32 *duration, IO_ProfStat* stats, int *num_stats) Sets an end profiler checkpoint and gets profiling data from the previous start checkpoint time of calling.
IO_ProfilerGetStatsAndRestartCheckpoint IO_PROF_RVAL IO_ProfilerGetStatsAndRestartCheckpoint(u32 flags, u32 *duration, IO_ProfStat* stats, int *num_stats) Equivalent of calling IO_ProfilerGetStatsAndEndCheckpoint immediately followed by IO_ProfilerStartCheckpoint.

Data Types and Defines

Enums

IOChannel

Name Value
IO_CHANNEL_USB 0
IO_CHANNEL_NET 1
IO_CHANNEL_CONTROLLER 2
IO_CHANNEL_SECIO 3
IO_CHANNEL_FS 4
IO_CHANNEL_SYS 5

Structs

IO_ProfStat

typedef struct IO_ProfStat {
    IOChannelID channel;
    float percentBandwidth;
} IO_ProfStat;