Project

General

Profile

Actions

Emulator Issues #11717

closed

Frequent JIT cache flushing in some games on AArch64

Added by Techjar almost 5 years ago. Updated about 2 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:
5.0-15524

Description

Game Name?

All Metroid Prime games
Donkey Kong Country Returns
True Crime: New York
Various other titles I don't remember

What's the problem? Describe what went wrong.

I'm making this issue as a way to encompass all the issue reports of game stuttering that are due to this, as well as have it properly documented for prospective devs.

Some games invalidate icache a lot which causes the JIT cache to fill up very quickly, resulting in frequent flushes which manifest as a very noticeable hitch in gameplay. This is due to our naive block allocator that simply places new blocks at the end of the buffer, and never reuses space from invalidated blocks until the cache is completely cleared. True Crime: New York is a particularly egregious offender, invalidating icache so much that the JIT cache is cleared every 2 seconds, making the game nearly unplayable. Even throwing that out as an outlier, many other titles experience stutters every few minutes that, while not making the game unplayable, are rather annoying and detract from the enjoyment.

What steps will reproduce the problem?

Play any of the listed games for some amount of time.

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

Yes, 5.0-10151

Is the issue present in the latest stable version?

Presumably yes. The JIT cache has not changed in years, though it's slightly worse in dev builds due to some JIT changes generating more code.

If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds and anyone who is building Dolphin on their own can use git bisect.)

N/A, been an issue since the dawn of time.

What are your PC specifications? (CPU, GPU, Operating System, more)

4.5GHz CPU Processor
24-bit Accelerated Video Graphics
Modern Operating System

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

Nope, but I will say that fixing this issue won't be easy. It's most likely going to require some pretty big changes to the whole JIT.


Related issues 3 (0 open3 closed)

Has duplicate Emulator - Emulator Issues #11998: Virtual Console Zelda OOT and MM StutterDuplicate

Actions
Has duplicate Emulator - Emulator Issues #11716: Donkey Kong Country Returns major stuttersDuplicate

Actions
Has duplicate Emulator - Emulator Issues #10014: Harry Potter: PoA freeze completely for several secondsDuplicate

Actions
Actions

Also available in: Atom PDF