Perf: Remove more breakpoint checking in the interpreter. Move filtering earlier in the logging chain
This commit is contained in:
parent
cddd447506
commit
9f4501aceb
6 changed files with 59 additions and 62 deletions
|
@ -953,6 +953,9 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
|
|||
#define INC_PC(l) ptr += sizeof(arm_inst) + l
|
||||
#define INC_PC_STUB ptr += sizeof(arm_inst)
|
||||
|
||||
#ifdef ANDROID
|
||||
#define GDB_BP_CHECK
|
||||
#else
|
||||
#define GDB_BP_CHECK \
|
||||
cpu->Cpsr &= ~(1 << 5); \
|
||||
cpu->Cpsr |= cpu->TFlag << 5; \
|
||||
|
@ -965,6 +968,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
|
|||
goto END; \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
// GCC and Clang have a C++ extension to support a lookup table of labels. Otherwise, fallback to a
|
||||
// clunky switch statement.
|
||||
|
@ -1652,11 +1656,13 @@ DISPATCH : {
|
|||
goto END;
|
||||
}
|
||||
|
||||
#ifndef ANDROID
|
||||
// Find breakpoint if one exists within the block
|
||||
if (GDBStub::IsConnected()) {
|
||||
breakpoint_data =
|
||||
GDBStub::GetNextBreakpointFromAddress(cpu->Reg[15], GDBStub::BreakpointType::Execute);
|
||||
}
|
||||
#endif
|
||||
|
||||
inst_base = (arm_inst*)&trans_cache_buf[ptr];
|
||||
GOTO_NEXT_INST;
|
||||
|
|
|
@ -182,13 +182,16 @@ void ARMul_State::ResetMPCoreCP15Registers() {
|
|||
CP15[CP15_MAIN_TLB_LOCKDOWN_ATTRIBUTE] = 0x00000000;
|
||||
CP15[CP15_TLB_DEBUG_CONTROL] = 0x00000000;
|
||||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
static void CheckMemoryBreakpoint(u32 address, GDBStub::BreakpointType type) {}
|
||||
#else
|
||||
static void CheckMemoryBreakpoint(u32 address, GDBStub::BreakpointType type) {
|
||||
if (GDBStub::IsServerEnabled() && GDBStub::CheckBreakpoint(address, type)) {
|
||||
LOG_DEBUG(Debug, "Found memory breakpoint @ {:08x}", address);
|
||||
GDBStub::Break(true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
u8 ARMul_State::ReadMemory8(u32 address) const {
|
||||
CheckMemoryBreakpoint(address, GDBStub::BreakpointType::Read);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue