Exemplo n.º 1
0
void Step()
{
    DSPCore_CheckExceptions();

    g_dsp.step_counter++;

#if PROFILE
    g_dsp.err_pc = g_dsp.pc;

    ProfilerAddDelta(g_dsp.err_pc, 1);
    if (g_dsp.step_counter == 1)
    {
        ProfilerInit();
    }

    if ((g_dsp.step_counter & 0xFFFFF) == 0)
    {
        ProfilerDump(g_dsp.step_counter);
    }
#endif

    u16 opc = dsp_fetch_code();
    ExecuteInstruction(UDSPInstruction(opc));

    if (DSPAnalyzer::code_flags[g_dsp.pc - 1] & DSPAnalyzer::CODE_LOOP_END)
        HandleLoop();
}
Exemplo n.º 2
0
/*
=================
Sys_EndProfiling
=================
*/
void Sys_EndProfiling( void ) {
	unsigned char	pstring[1024];
	
	if ( !sys_profiling ) {
		return;
	}
	sys_profiling = qfalse;
	
	sprintf( (char *)pstring + 1, "%s:profile.txt", Cvar_VariableString( "fs_basepath" ) );
	pstring[0] = strlen( (char *)pstring + 1 );
	ProfilerDump( pstring );
	ProfilerTerm();
}