MCPcopy Create free account
hub / github.com/defold/defold / AutoCloseLuaProfilerScopes

Function AutoCloseLuaProfilerScopes

engine/profiler/src/profiler.cpp:234–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234static void AutoCloseLuaProfilerScopes()
235{
236 for (LuaProfilerScopeState* state = g_LuaProfilerScopeStates; state != 0; state = state->m_Next)
237 {
238 LuaProfilerScope scope = {0};
239 while (!state->m_Scopes.Empty())
240 {
241 scope = state->m_Scopes.Back();
242 state->m_Scopes.Pop();
243 const char* name = GetLuaProfilerScopeName(state, &scope);
244 dmLogError("Lua profiler scope '%s' was not closed before the end of the frame. Auto-closing it.", name);
245 ProfileScopeEnd(name, scope.m_NameHash);
246 state->m_Names.SetSize(scope.m_NameOffset);
247 }
248 }
249
250 DeleteEmptyLuaProfilerScopeStates();
251}
252
253void SetUpdateFrequency(uint32_t update_frequency)
254{

Callers 2

PreRenderProfilerFunction · 0.85
FinalizeProfilerFunction · 0.85

Calls 6

GetLuaProfilerScopeNameFunction · 0.85
ProfileScopeEndFunction · 0.50
EmptyMethod · 0.45
PopMethod · 0.45
SetSizeMethod · 0.45

Tested by

no test coverage detected