MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / Init

Function Init

FEXCore/Source/Utils/Profiler.cpp:72–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70};
71
72void Init() {
73 for (auto Path : TraceFSDirectories) {
74#ifdef _WIN32
75 constexpr auto flags = O_WRONLY;
76#else
77 constexpr auto flags = O_WRONLY | O_CLOEXEC;
78#endif
79 fextl::string FilePath = fextl::fmt::format("{}/trace_marker", Path);
80 TraceFD = open(FilePath.c_str(), flags);
81 if (TraceFD != -1) {
82 // Opened TraceFD, early exit
83 break;
84 }
85 }
86}
87
88void Shutdown() {
89 if (TraceFD != -1) {

Callers

nothing calls this directly

Calls 3

formatFunction · 0.85
getenvFunction · 0.85
IFmtFunction · 0.85

Tested by

no test coverage detected