diff --git a/Core/MIPS/IR/IRJit.cpp b/Core/MIPS/IR/IRJit.cpp index ea09c6b173d2..1a92476f8f6a 100644 --- a/Core/MIPS/IR/IRJit.cpp +++ b/Core/MIPS/IR/IRJit.cpp @@ -256,13 +256,12 @@ void IRJit::RunLoopUntil(u64 globalticks) { if (opcode == MIPS_EMUHACK_OPCODE) { u32 offset = inst & 0x00FFFFFF; // Alternatively, inst - opcode #ifdef IR_PROFILING - { - TimeSpan span; - IRBlock *block = blocks_.GetBlock(blocks_.GetBlockNumFromOffset(inst & 0xFFFFFF)); - mips->pc = IRInterpret(mips, blocks_.GetArenaPtr() + offset); - block->profileStats_.executions += 1; - block->profileStats_.totalNanos += span.ElapsedNanos(); - } + IRBlock *block = blocks_.GetBlock(blocks_.GetBlockNumFromOffset(offset)); + TimeSpan span; + mips->pc = IRInterpret(mips, blocks_.GetArenaPtr() + offset); + int64_t elapsedNanos = span.ElapsedNanos(); + block->profileStats_.executions += 1; + block->profileStats_.totalNanos += elapsedNanos; #else mips->pc = IRInterpret(mips, blocks_.GetArenaPtr() + offset); #endif diff --git a/Core/MIPS/IR/IRJit.h b/Core/MIPS/IR/IRJit.h index bbc4bb0283ca..6595676b7a33 100644 --- a/Core/MIPS/IR/IRJit.h +++ b/Core/MIPS/IR/IRJit.h @@ -95,6 +95,7 @@ class IRBlock { u64 CalculateHash() const; // Offset into the block cache's Arena + // TODO: These should maybe be stored in a separate array. u32 instOffset_ = 0; u64 hash_ = 0; u32 origAddr_ = 0;