47#define PCSX_PROF_MAGIC 0x46505150
48#define PCSX_PROF_VERSION 1
97static inline int pcsx_profHeaderValid(uint32_t magic, uint32_t version, uint32_t entrySize, uint32_t capacity,
100 (entrySize >=
sizeof(
struct pcsx_ProfEntry)) && !(entrySize & 3) && capacity &&
101 !(capacity & (capacity - 1)) && (entrySize <= 64) && (capacity <= 0x200000 / entrySize) && !(entries & 3);
106static inline uint32_t pcsx_profElapsed(uint32_t a, uint32_t
b, uint32_t cyclesPer16Lines) {
107 uint32_t
lines = (uint16_t)((
b >> 16) - (
a >> 16));
108 uint32_t
cycles = (uint16_t)(
b - a);
110 uint32_t estimate = (
lines * cyclesPer16Lines) >> 4;
111 int32_t
wraps = ((int32_t)(estimate - cycles) + 32768) >> 16;
uint8_t b
Definition gte-depthcue.c:41
int a
Definition mktest.py:134
int cycles
Definition mktest.py:120
pcsx_ProfFlags
Definition pcsxprof.h:50
@ PCSX_PROF_FLAG_PAL
Definition pcsxprof.h:53
#define PCSX_PROF_MAGIC
Definition pcsxprof.h:47
#define PCSX_PROF_VERSION
Definition pcsxprof.h:48
uint32_t end
Definition pcsxprof.h:69
uint8_t depth
Definition pcsxprof.h:73
uint32_t zone
Definition pcsxprof.h:67
uint16_t vsync
Definition pcsxprof.h:71
uint32_t start
Definition pcsxprof.h:68
uint8_t stackDepth
Definition pcsxprof.h:76
uint32_t name
Definition pcsxprof.h:59
uint32_t file
Definition pcsxprof.h:60
uint32_t line
Definition pcsxprof.h:61
uint32_t wraps
Definition timers.c:594
int lines
Definition timers.c:412