mirror of
https://github.com/PCSX2/pcsx2-sourceforge.git
synced 2026-02-04 03:11:18 +01:00
added some code for easy profiling of changes on the EE. can be enabled by uncommenting the #define EEPROFILING in r5900.h
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
#include "PsxCommon.h"
|
||||
#include "GS.h"
|
||||
|
||||
u64 profile_starttick = 0;
|
||||
u64 profile_totalticks = 0;
|
||||
|
||||
int gates = 0;
|
||||
extern u8 psxhblankgate;
|
||||
int hblankend = 0;
|
||||
@@ -265,10 +268,12 @@ void VSync()
|
||||
SysUpdate();
|
||||
} else { // VSync Start (240 hsyncs)
|
||||
//UpdateVSyncRateEnd();
|
||||
/*if( (iFrame%20) == 0 ) {
|
||||
SysPrintf("Cycles for unpacks at %d frames %x\n", iFrame, unpacktotal);
|
||||
unpacktotal = 0;
|
||||
}*/
|
||||
#ifdef EE_PROFILING
|
||||
if( (iFrame%20) == 0 ) {
|
||||
SysPrintf("Profiled Cycles at %d frames %d\n", iFrame, profile_totalticks);
|
||||
CLEAR_EE_PROFILE();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//SysPrintf("c: %x, %x\n", cpuRegs.cycle, *(u32*)&VU1.Micro[16]);
|
||||
@@ -613,6 +618,7 @@ void rcntUpdate()
|
||||
|
||||
|
||||
rcntSet();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -277,5 +277,28 @@ extern u32 g_EEFreezeRegs;
|
||||
#define EXC_TLB_STORE 1
|
||||
#define EXC_TLB_LOAD 0
|
||||
|
||||
//#define EE_PROFILING //EE Profiling enable
|
||||
|
||||
#ifdef EE_PROFILING //EE Profiling code
|
||||
|
||||
extern u64 profile_starttick;
|
||||
extern u64 profile_totalticks;
|
||||
|
||||
#define START_EE_PROFILE() \
|
||||
profile_starttick = GetCPUTick();
|
||||
|
||||
#define END_EE_PROFILE() \
|
||||
profile_totalticks += GetCPUTick()-profile_starttick;
|
||||
|
||||
#define CLEAR_EE_PROFILE() \
|
||||
profile_totalticks = 0;
|
||||
|
||||
#else
|
||||
#define START_EE_PROFILE()
|
||||
|
||||
#define END_EE_PROFILE()
|
||||
|
||||
#define CLEAR_EE_PROFILE()
|
||||
#endif
|
||||
|
||||
#endif /* __R5900_H__ */
|
||||
|
||||
Reference in New Issue
Block a user