Skip to content

Commit

Permalink
Profiler: Fix 32-bit applications
Browse files Browse the repository at this point in the history
  • Loading branch information
neobrain committed Jan 24, 2025
1 parent 1968e8e commit 177e9c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ if (ENABLE_FEXCORE_PROFILER)
# Tracy can gather call stack samples in regular intervals, but this
# isn't useful for us since it would usually sample opaque JIT code
add_definitions(-DTRACY_NO_SAMPLING=1)
# This pulls in libbacktrace which allocators in global constructors (before FEX can set up its allocator hooks)
add_definitions(-DTRACY_NO_CALLSTACK=1)
else()
message(FATAL_ERROR "Unknown FEXCore profiler backend ${FEXCORE_PROFILER_BACKEND}")
endif()
Expand Down
3 changes: 2 additions & 1 deletion Source/Tools/FEXLoader/FEXLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,6 @@ int main(int argc, char** argv, char** const envp) {
std::this_thread::sleep_for(std::chrono::seconds(StartupSleep()));
}

FEXCore::Profiler::Init(Program.ProgramName, Program.ProgramPath);
FEXCore::Telemetry::Initialize();

if (!LDPath().empty() && Program.ProgramPath.starts_with(LDPath())) {
Expand Down Expand Up @@ -518,6 +517,8 @@ int main(int argc, char** argv, char** const envp) {
free(data);
}

FEXCore::Profiler::Init(Program.ProgramName, Program.ProgramPath);

// System allocator is now system allocator or FEX
FEXCore::Context::InitializeStaticTables(Loader.Is64BitMode() ? FEXCore::Context::MODE_64BIT : FEXCore::Context::MODE_32BIT);

Expand Down

0 comments on commit 177e9c5

Please sign in to comment.