New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call UpdatePerformanceMonitor when needed #9355
Conversation
| m_code.emplace_back(EndBlock, js.downcountAmount); | ||
| m_code.emplace_back(UpdateNumLoadStoreInstructions, js.numLoadStoreInst); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are any games known to use these counters? If not, two calls at the end of every block is steep price to pay. Have you considered replicating the MCR check that is in the JIT? It's definitely a hack, but it seems justifiable if the feature is only exercised by test code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No games use them as far as I know. (We should've gotten reports about things breaking on ARM by now otherwise.)
I was a bit unsure if I should add that hack here or not when I was working on the code. But I'd like to have input from one more person before switching it over.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you measured the performance impact?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it now, and it actually seems to be running one FPS faster with this change than without. I'm going to assume it's just a random variation and not an actual performance improvement. (The scene I used was the file select screen in Anubis II, which runs at about 33 FPS for me. The scene has 3D graphics but is otherwise relatively light.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it's not worth porting the speed hack to the interpreter, then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, never mind about no games using them. Harry Potter and the Prisoner of Azkaban uses them according to cdace9d, and that game has indeed been known to be broken in JitArm64.
I find the performance monitor functionality useful for timing hardware tests, but unfortunately it hasn't worked correctly in Dolphin except when using the x86-64 JIT with no idle skipping. This PR makes it work (mostly) correctly on all CPU emulation cores.