shachi/include/shachi/profiler.h
(172 lines)
- C99 header implementing SPECTRE Spec 8
- Constants:
SH_PROF_MAX_ZONES=32,
SH_PROF_AVG_FRAMES=60
- Common zone indices: SH_ZONE_UPDATE=0, TRANSFORM=1, SUBMIT=2,
RENDER=3, AUDIO=4, DISC_IO=5, AI=6, PHYSICS=7
sh_prof_zone_t: name, start_ns, total_ns, worst_ns,
call_count, active
sh_profiler_t: zones[32], frame tracking, 60-frame
rolling window, hw counter, overlay_enabled
- Functions:
sh_prof_init,
sh_prof_frame_begin/end,
sh_prof_zone_register/begin/end, SH_PROF_ZONE
cleanup macro, sh_prof_avg_frame_us,
sh_prof_fps, sh_prof_zone_us,
sh_prof_zone_calls, sh_prof_hw_count,
sh_prof_print, sh_prof_dump,
sh_prof_overlay