mirror of https://github.com/PCSX2/pcsx2.git
mVU: always call perf before leaving the compilation function
I misses some early return in my first tentative. Now VTune shows me properly the time in VU recompiler. Note: It seem some block overlap (likely due to the branching mess). But it is still way better than no data
This commit is contained in:
parent
632b4971de
commit
c2587abcea
|
@ -629,7 +629,7 @@ void* mVUcompile(microVU& mVU, u32 startPC, uptr pState) {
|
||||||
if (isEvilBlock) {
|
if (isEvilBlock) {
|
||||||
mVUsetupRange(mVU, xPC, false);
|
mVUsetupRange(mVU, xPC, false);
|
||||||
normJumpCompile(mVU, mFC, true);
|
normJumpCompile(mVU, mFC, true);
|
||||||
return thisPtr;
|
goto perf_and_return;
|
||||||
}
|
}
|
||||||
else if (!mVUinfo.isBdelay) {
|
else if (!mVUinfo.isBdelay) {
|
||||||
incPC(1);
|
incPC(1);
|
||||||
|
@ -640,14 +640,14 @@ void* mVUcompile(microVU& mVU, u32 startPC, uptr pState) {
|
||||||
incPC(-3); // Go back to branch opcode
|
incPC(-3); // Go back to branch opcode
|
||||||
|
|
||||||
switch (mVUlow.branch) {
|
switch (mVUlow.branch) {
|
||||||
case 1: case 2: normBranch(mVU, mFC); return thisPtr; // B/BAL
|
case 1: case 2: normBranch(mVU, mFC); goto perf_and_return; // B/BAL
|
||||||
case 9: case 10: normJump (mVU, mFC); return thisPtr; // JR/JALR
|
case 9: case 10: normJump (mVU, mFC); goto perf_and_return; // JR/JALR
|
||||||
case 3: condBranch(mVU, mFC, Jcc_Equal); return thisPtr; // IBEQ
|
case 3: condBranch(mVU, mFC, Jcc_Equal); goto perf_and_return; // IBEQ
|
||||||
case 4: condBranch(mVU, mFC, Jcc_GreaterOrEqual); return thisPtr; // IBGEZ
|
case 4: condBranch(mVU, mFC, Jcc_GreaterOrEqual); goto perf_and_return; // IBGEZ
|
||||||
case 5: condBranch(mVU, mFC, Jcc_Greater); return thisPtr; // IBGTZ
|
case 5: condBranch(mVU, mFC, Jcc_Greater); goto perf_and_return; // IBGTZ
|
||||||
case 6: condBranch(mVU, mFC, Jcc_LessOrEqual); return thisPtr; // IBLEQ
|
case 6: condBranch(mVU, mFC, Jcc_LessOrEqual); goto perf_and_return; // IBLEQ
|
||||||
case 7: condBranch(mVU, mFC, Jcc_Less); return thisPtr; // IBLTZ
|
case 7: condBranch(mVU, mFC, Jcc_Less); goto perf_and_return; // IBLTZ
|
||||||
case 8: condBranch(mVU, mFC, Jcc_NotEqual); return thisPtr; // IBNEQ
|
case 8: condBranch(mVU, mFC, Jcc_NotEqual); goto perf_and_return; // IBNEQ
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -658,6 +658,8 @@ void* mVUcompile(microVU& mVU, u32 startPC, uptr pState) {
|
||||||
mVUsetupRange(mVU, xPC-8, false);
|
mVUsetupRange(mVU, xPC-8, false);
|
||||||
mVUendProgram(mVU, &mFC, 1);
|
mVUendProgram(mVU, &mFC, 1);
|
||||||
|
|
||||||
|
perf_and_return:
|
||||||
|
|
||||||
Perf::vu.map((uptr)thisPtr, x86Ptr - thisPtr, startPC);
|
Perf::vu.map((uptr)thisPtr, x86Ptr - thisPtr, startPC);
|
||||||
|
|
||||||
return thisPtr;
|
return thisPtr;
|
||||||
|
|
Loading…
Reference in New Issue