From ca697d0d5d507ed41c9d2edf1d74cd729dd4eaf0 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 16 Oct 2025 17:48:53 -0700 Subject: [PATCH] FEX: Disable trace profiler by default Use a config option to turn it on. --- FEXCore/Source/Interface/Config/Config.json.in | 7 +++++++ FEXCore/Source/Utils/Profiler.cpp | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/FEXCore/Source/Interface/Config/Config.json.in b/FEXCore/Source/Interface/Config/Config.json.in index 7bb03ad73..1ddd90b0b 100644 --- a/FEXCore/Source/Interface/Config/Config.json.in +++ b/FEXCore/Source/Interface/Config/Config.json.in @@ -338,6 +338,13 @@ "Enables FEX's low-overhead sampling profile statistics.", "Requires a supported version of Mangohud to see the results" ] + }, + "EnableGpuvisProfiling": { + "Type": "bool", + "Default": "false", + "Desc": [ + "Enables profiling when FEX was built with the gpuvis profiler backend." + ] } }, "Hacks": { diff --git a/FEXCore/Source/Utils/Profiler.cpp b/FEXCore/Source/Utils/Profiler.cpp index 6f290d30e..3240bdc74 100644 --- a/FEXCore/Source/Utils/Profiler.cpp +++ b/FEXCore/Source/Utils/Profiler.cpp @@ -70,6 +70,10 @@ static std::array TraceFSDirectories { }; void Init() { + FEX_CONFIG_OPT(EnableGpuvisProfiling, ENABLEGPUVISPROFILING); + if (!EnableGpuvisProfiling()) { + return; + } for (auto Path : TraceFSDirectories) { #ifdef _WIN32 constexpr auto flags = O_WRONLY;