Kernel module for debugging, returns profiling registers.
make && make profilerLib.S
Move profiler.prx and profilerLib.S to your project.
In your project's Makefile include profilerLib.o to OBJS
Example:
SceUID modid;
PspDebugProfilerRegs regs;
int ret;
int fd;
modid = sceKernelLoadModule("profiler.prx", 0, NULL);
ret = sceKernelStartModule(modid, 0, NULL, &fd, NULL);
ProfileClear();
ProfileEnable();
ProfileGetRegs(®s);
printf("D cache miss : %10u", regs.d_miss);