Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
Functions | Variables
profiler.c File Reference
#include <ultra64.h>
#include "sm64.h"
#include "profiler.h"
#include "game.h"

Functions

void profiler_log_thread5_time (enum ProfilerGameEvent eventID)
 
void profiler_log_thread4_time (void)
 
void profiler_log_gfx_time (enum ProfilerGfxEvent eventID)
 
void profiler_log_vblank_time (void)
 
void draw_profiler_bar (s64 clock_base, s64 clock_start, s64 clock_end, s16 pos_y, u16 color)
 
void draw_reference_profiler_bars (void)
 
void draw_profiler_mode_1 (void)
 
void draw_profiler_mode_0 (void)
 
void draw_profiler (void)
 

Variables

s16 gProfilerMode = 0
 
s16 gCurrentFrameIndex1 = 1
 
s16 gCurrentFrameIndex2 = 0
 
struct ProfilerFrameData gProfilerFrameData [2]
 

Function Documentation

◆ draw_profiler()

void draw_profiler ( void  )

◆ draw_profiler_bar()

void draw_profiler_bar ( s64  clock_base,
s64  clock_start,
s64  clock_end,
s16  pos_y,
u16  color 
)

I believe this is supposed to cap rect_x1 and rect_x2 to 320, but the

◆ draw_profiler_mode_0()

void draw_profiler_mode_0 ( void  )

wrong index used to retrieve vblankTimes, thus empty pairs can

◆ draw_profiler_mode_1()

void draw_profiler_mode_1 ( void  )

RSP and RDP run in parallel, so while they are not absolutely guaranteed to return in order,

◆ draw_reference_profiler_bars()

void draw_reference_profiler_bars ( void  )

◆ profiler_log_gfx_time()

void profiler_log_gfx_time ( enum ProfilerGfxEvent  eventID)

◆ profiler_log_thread4_time()

void profiler_log_thread4_time ( void  )

◆ profiler_log_thread5_time()

void profiler_log_thread5_time ( enum ProfilerGameEvent  eventID)

◆ profiler_log_vblank_time()

void profiler_log_vblank_time ( void  )

Variable Documentation

◆ gCurrentFrameIndex1

s16 gCurrentFrameIndex1 = 1

◆ gCurrentFrameIndex2

s16 gCurrentFrameIndex2 = 0

◆ gProfilerFrameData

struct ProfilerFrameData gProfilerFrameData[2]

◆ gProfilerMode

s16 gProfilerMode = 0