mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-17 16:30:30 +02:00
Improve accuracy of block timing
This commit is contained in:
1 parent
a6f398a7d2
commit
7ef6cdb515
2 files changed
+7
-7
No files matched your search
@@ -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
|
||||
|
||||
@@ -103,6 +103,7 @@ private:
|
||||
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;
|
||||
|
||||
Reference in new issue
Block a user