resonance 1.0.1
Loading...
Searching...
No Matches
profiler.h File Reference
#include <vector>
#include "os/hxstr.h"
Include dependency graph for profiler.h:

Go to the source code of this file.

Classes

struct  ProfileTimer
 One labelled interval the profiler accumulates, 0x14 bytes. More...

Functions

void ResetFrameTimer ()
 Store g_flCyclesToMilliseconds and restart g_frameTimer from the current EE Count.

Variables

std::vector< ProfileTimer > g_profileTimers
 The timers the game accumulates into during a frame, twenty records.
std::vector< ProfileTimer > g_lastFrameProfileTimers
 The previous frame's copy of the timers, twenty records.
float g_flCyclesToMilliseconds
 Milliseconds per EE cycle, 1.0f / 294912.0f, which the frame timer reset stores.
ProfileTimer g_frameTimer
 The frame interval ResetFrameTimer() restarts, a record outside both tables.
long long g_llFrameTimerCycles
 Doubleword ResetFrameTimer() clears.

Function Documentation

◆ ResetFrameTimer()

void ResetFrameTimer ( )

Store g_flCyclesToMilliseconds and restart g_frameTimer from the current EE Count.

The timer is first left as a nested interval is. Its depth drops by one, and when that reaches zero the cycles since mStartCycles are added to mCycles. The reset then clears mCycles, which discards that addition, sets the depth to 1, records the current Count, and clears g_llFrameTimerCycles. Rnd::Manager::Init() is the one caller. The name is the analysis program's.

Ghidra address:
NTSC-U/C: 0x0053dcf8
Ghidra address:
PAL: 0x0057d928

Variable Documentation

◆ g_profileTimers

std::vector<ProfileTimer> g_profileTimers
extern

The timers the game accumulates into during a frame, twenty records.

MainLoop labels the first four, and GfxDevice::DrawSubsystemTimingGraph() draws one bar per record.

Ghidra address:
NTSC-U/C: 0x00720378
Ghidra address:
PAL: 0x00763e00

◆ g_lastFrameProfileTimers

std::vector<ProfileTimer> g_lastFrameProfileTimers
extern

The previous frame's copy of the timers, twenty records.

GfxDevice::BeginFrame() passes it by address, and the frame-rate readouts take the frame time from record 19 and a second interval from record 18.

Ghidra address:
NTSC-U/C: 0x00720388
Ghidra address:
PAL: 0x00763e10

◆ g_flCyclesToMilliseconds

float g_flCyclesToMilliseconds
extern

Milliseconds per EE cycle, 1.0f / 294912.0f, which the frame timer reset stores.

Ghidra address:
NTSC-U/C: 0x00720394
Ghidra address:
PAL: 0x00763e1c

◆ g_frameTimer

ProfileTimer g_frameTimer
extern

The frame interval ResetFrameTimer() restarts, a record outside both tables.

The name is inferred.

Ghidra address:
NTSC-U/C: 0x007203a0
Ghidra address:
PAL: 0x00763e28

◆ g_llFrameTimerCycles

long long g_llFrameTimerCycles
extern

Doubleword ResetFrameTimer() clears.

The image has no reader, and the name is inferred.

Ghidra address:
NTSC-U/C: 0x00720398
Ghidra address:
PAL: 0x00763e20