CachedInterpreter: Call UpdatePerformanceMonitor
This commit is contained in:
parent
f8f3548ca9
commit
2dcd0b248f
|
@ -134,6 +134,17 @@ static void EndBlock(UGeckoInstruction data)
|
||||||
{
|
{
|
||||||
PC = NPC;
|
PC = NPC;
|
||||||
PowerPC::ppcState.downcount -= data.hex;
|
PowerPC::ppcState.downcount -= data.hex;
|
||||||
|
PowerPC::UpdatePerformanceMonitor(data.hex, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void UpdateNumLoadStoreInstructions(UGeckoInstruction data)
|
||||||
|
{
|
||||||
|
PowerPC::UpdatePerformanceMonitor(0, data.hex, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void UpdateNumFloatingPointInstructions(UGeckoInstruction data)
|
||||||
|
{
|
||||||
|
PowerPC::UpdatePerformanceMonitor(0, 0, data.hex);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WritePC(UGeckoInstruction data)
|
static void WritePC(UGeckoInstruction data)
|
||||||
|
@ -230,6 +241,8 @@ void CachedInterpreter::Jit(u32 address)
|
||||||
js.firstFPInstructionFound = false;
|
js.firstFPInstructionFound = false;
|
||||||
js.fifoBytesSinceCheck = 0;
|
js.fifoBytesSinceCheck = 0;
|
||||||
js.downcountAmount = 0;
|
js.downcountAmount = 0;
|
||||||
|
js.numLoadStoreInst = 0;
|
||||||
|
js.numFloatingPointInst = 0;
|
||||||
js.curBlock = b;
|
js.curBlock = b;
|
||||||
|
|
||||||
b->checkedEntry = GetCodePtr();
|
b->checkedEntry = GetCodePtr();
|
||||||
|
@ -240,6 +253,10 @@ void CachedInterpreter::Jit(u32 address)
|
||||||
PPCAnalyst::CodeOp& op = m_code_buffer[i];
|
PPCAnalyst::CodeOp& op = m_code_buffer[i];
|
||||||
|
|
||||||
js.downcountAmount += op.opinfo->numCycles;
|
js.downcountAmount += op.opinfo->numCycles;
|
||||||
|
if (op.opinfo->flags & FL_LOADSTORE)
|
||||||
|
++js.numLoadStoreInst;
|
||||||
|
if (op.opinfo->flags & FL_USE_FPU)
|
||||||
|
++js.numFloatingPointInst;
|
||||||
|
|
||||||
if (HandleFunctionHooking(op.address))
|
if (HandleFunctionHooking(op.address))
|
||||||
break;
|
break;
|
||||||
|
@ -274,13 +291,19 @@ void CachedInterpreter::Jit(u32 address)
|
||||||
if (idle_loop)
|
if (idle_loop)
|
||||||
m_code.emplace_back(CheckIdle, js.blockStart);
|
m_code.emplace_back(CheckIdle, js.blockStart);
|
||||||
if (endblock)
|
if (endblock)
|
||||||
|
{
|
||||||
m_code.emplace_back(EndBlock, js.downcountAmount);
|
m_code.emplace_back(EndBlock, js.downcountAmount);
|
||||||
|
m_code.emplace_back(UpdateNumLoadStoreInstructions, js.numLoadStoreInst);
|
||||||
|
m_code.emplace_back(UpdateNumFloatingPointInstructions, js.numFloatingPointInst);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (code_block.m_broken)
|
if (code_block.m_broken)
|
||||||
{
|
{
|
||||||
m_code.emplace_back(WriteBrokenBlockNPC, nextPC);
|
m_code.emplace_back(WriteBrokenBlockNPC, nextPC);
|
||||||
m_code.emplace_back(EndBlock, js.downcountAmount);
|
m_code.emplace_back(EndBlock, js.downcountAmount);
|
||||||
|
m_code.emplace_back(UpdateNumLoadStoreInstructions, js.numLoadStoreInst);
|
||||||
|
m_code.emplace_back(UpdateNumFloatingPointInstructions, js.numFloatingPointInst);
|
||||||
}
|
}
|
||||||
m_code.emplace_back();
|
m_code.emplace_back();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue