Skip to content
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

Jit: Allow BLR optimization without fastmem #12079

Merged
merged 2 commits into from Sep 2, 2023

Conversation

JosJuice
Copy link
Member

@JosJuice JosJuice commented Jul 30, 2023

While both fastmem and the BLR optimization depend on fault handling, the BLR optimization doesn't depend on fastmem, and there are cases where you might want the BLR optimization but not fastmem. For me personally, it's useful when I try to use a debugger on Android and have to disable fastmem so I don't get SIGSEGVs all the time, but it would be especially useful for iOS users.

@JosJuice
Copy link
Member Author

flacs pointed out that fastmem being supported likely was being used as an indicator that the host supports setting up a guard page for the stack and intercepting faults caused by accesses to that page. I think it's fine to stop doing this, since we can disable the BLR optimization if we notice that setting up the guard page fails. JitBase::ProtectStack() already does this for some types of failures, but I'll add another commit to this PR to make it more robust.

While both fastmem and the BLR optimization depend on fault handling,
the BLR optimization doesn't depend on fastmem, and there are cases
where you might want the BLR optimization but not fastmem. For me
personally, it's useful when I try to use a debugger on Android and have
to disable fastmem so I don't get SIGSEGVs all the time, but it would be
especially useful for iOS users.
@JMC47
Copy link
Contributor

JMC47 commented Sep 2, 2023

This has been sitting here a month. Let's test it in production.

@JMC47 JMC47 merged commit bd57d17 into dolphin-emu:master Sep 2, 2023
11 checks passed
@JosJuice JosJuice deleted the blr-no-fastmem branch September 2, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants