Loading...
Searching...
No Matches
profile.h
Go to the documentation of this file.
1
41#ifndef OPENSNES_PROFILE_H
42#define OPENSNES_PROFILE_H
43
44#include <snes/types.h>
45
46/*============================================================================
47 * Color Constants for Visual Profiling
48 *
49 * Each constant is an index into the internal color table.
50 *============================================================================*/
51
52#define PROFILE_RED 0
53#define PROFILE_GREEN 1
54#define PROFILE_BLUE 2
55#define PROFILE_YELLOW 3
56#define PROFILE_CYAN 4
57#define PROFILE_MAGENTA 5
58#define PROFILE_WHITE 6
59
60/*============================================================================
61 * Initialization
62 *============================================================================*/
63
73void profileInit(void);
74
75/*============================================================================
76 * Visual Color-Bar Profiling
77 *
78 * Sets the fixed color (COLDATA $2132) to show colored bands on screen.
79 * The band width shows how much CPU time the section uses.
80 * Multiple sections can use different colors to identify bottlenecks.
81 *============================================================================*/
82
89
95void profileColorEnd(void);
96
97/*============================================================================
98 * Scanline-Based Timing
99 *============================================================================*/
100
105
110
118
119/*============================================================================
120 * Frame Counters
121 *============================================================================*/
122
127
134
135#endif /* OPENSNES_PROFILE_H */
static u16 color
Definition main.c:163
unsigned short u16
16-bit unsigned integer (0 to 65535)
Definition types.h:52
u16 profileGetLagFrames(void)
Get lag frame count since boot.
void profileScanlineStart(void)
Start a scanline-based timing measurement.
u16 profileGetScanline(void)
Get the current scanline number (0-261 NTSC, 0-311 PAL)
u16 profileGetFrameCount(void)
Get total frame count since boot (wraps at 65535)
void profileColorStart(u16 color)
Start a color-bar profiling section.
u16 profileScanlineEnd(void)
End a scanline-based timing measurement.
void profileInit(void)
Initialize the profiler.
void profileColorEnd(void)
End a color-bar profiling section.
OpenSNES Standard Types.