Skip to content

Commit

Permalink
Merge pull request #3517 from Sonicadvance1/remove_mman
Browse files Browse the repository at this point in the history
FEXCore: Removes vestigial mman SMC checking
  • Loading branch information
lioncash authored Mar 27, 2024
2 parents 4ea6305 + 6f29e75 commit 542f454
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
5 changes: 2 additions & 3 deletions FEXCore/Source/Interface/Config/Config.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,8 @@
"Desc": [
"Checks code for modification before execution.",
"\tnone: No checks",
"\tmtrack: Page tracking based invalidation",
"\tfull: Validate code before every run (slow)",
"\tmman: Invalidate on mmap, mprotect, munmap (deprecated, use mtrack)"
"\tmtrack: Page tracking based invalidation (default)",
"\tfull: Validate code before every run (slow)"
]
},
"TSOEnabled": {
Expand Down
3 changes: 0 additions & 3 deletions FEXCore/include/FEXCore/Config/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ namespace Handler {
return "1";
else if (Value == "full")
return "2";
else if (Value == "mman")
return "3";
return "0";
}
static inline std::optional<fextl::string> CacheObjectCodeHandler(std::string_view Value) {
Expand Down Expand Up @@ -67,7 +65,6 @@ namespace Handler {
CONFIG_SMC_NONE,
CONFIG_SMC_MTRACK,
CONFIG_SMC_FULL,
CONFIG_SMC_MMAN,
};

enum ConfigObjectCodeHandler {
Expand Down
5 changes: 1 addition & 4 deletions Source/Tools/FEXConfig/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ namespace {
}

ImGui::Text("SMC Checks: ");
int SMCChecks = FEXCore::Config::CONFIG_SMC_MMAN;
int SMCChecks = FEXCore::Config::CONFIG_SMC_MTRACK;

Value = LoadedConfig->Get(FEXCore::Config::ConfigOption::CONFIG_SMCCHECKS);
if (Value.has_value()) {
Expand All @@ -578,16 +578,13 @@ namespace {
SMCChecks = FEXCore::Config::CONFIG_SMC_MTRACK;
} else if (**Value == "2") {
SMCChecks = FEXCore::Config::CONFIG_SMC_FULL;
} else if (**Value == "3") {
SMCChecks = FEXCore::Config::CONFIG_SMC_MMAN;
}
}

bool SMCChanged = false;
SMCChanged |= ImGui::RadioButton("None", &SMCChecks, FEXCore::Config::CONFIG_SMC_NONE); ImGui::SameLine();
SMCChanged |= ImGui::RadioButton("MTrack (Default)", &SMCChecks, FEXCore::Config::CONFIG_SMC_MTRACK); ImGui::SameLine();
SMCChanged |= ImGui::RadioButton("Full", &SMCChecks, FEXCore::Config::CONFIG_SMC_FULL);
SMCChanged |= ImGui::RadioButton("MMan (Deprecated)", &SMCChecks, FEXCore::Config::CONFIG_SMC_MMAN); ImGui::SameLine();

if (SMCChanged) {
LoadedConfig->EraseSet(FEXCore::Config::ConfigOption::CONFIG_SMCCHECKS, std::to_string(SMCChecks));
Expand Down

0 comments on commit 542f454

Please sign in to comment.