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

Function PostForkAction

FEXCore/Source/Utils/Profiler.cpp:137–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137void PostForkAction(bool IsChild) {
138 if (Enable) {
139 // Tracy does not support multiprocess profiling
140 LogMan::Msg::EFmt("Warning: Profiling a process with forks is not supported. Set the environment variable "
141 "FEX_PROFILE_WAIT_FOR_FORK=<n> to start profiling after the n-th fork.");
142 }
143
144 if (IsChild) {
145 Enable = false;
146 return;
147 }
148
149 if (EnableAfterFork > 1) {
150 --EnableAfterFork;
151 LogMan::Msg::IFmt("Tracy profiling will start after {} forks", EnableAfterFork);
152 } else if (EnableAfterFork == 1) {
153 Enable = true;
154 EnableAfterFork = 0;
155 tracy::StartupProfiler();
156 LogMan::Msg::IFmt("Tracy profiling started");
157 }
158}
159
160void Shutdown() {
161 if (Tracy::Enable) {

Callers 1

UnlockAfterForkMethod · 0.50

Calls 2

EFmtFunction · 0.85
IFmtFunction · 0.85

Tested by

no test coverage detected