Fix some profile event names

This commit is contained in:
Wojtek Figat
2021-05-04 00:16:01 +02:00
parent f6137831ee
commit aa7c467679
2 changed files with 16 additions and 16 deletions

View File

@@ -203,7 +203,7 @@ void LayersAndTagsSettings::Apply()
void LevelService::Update() void LevelService::Update()
{ {
PROFILE_CPU(); PROFILE_CPU_NAMED("Level::Update");
ScopeLock lock(Level::ScenesLock); ScopeLock lock(Level::ScenesLock);
auto& scenes = Level::Scenes; auto& scenes = Level::Scenes;
@@ -232,7 +232,7 @@ void LevelService::Update()
void LevelService::LateUpdate() void LevelService::LateUpdate()
{ {
PROFILE_CPU(); PROFILE_CPU_NAMED("Level::LateUpdate");
ScopeLock lock(Level::ScenesLock); ScopeLock lock(Level::ScenesLock);
auto& scenes = Level::Scenes; auto& scenes = Level::Scenes;
@@ -264,7 +264,7 @@ void LevelService::LateUpdate()
void LevelService::FixedUpdate() void LevelService::FixedUpdate()
{ {
PROFILE_CPU(); PROFILE_CPU_NAMED("Level::FixedUpdate");
ScopeLock lock(Level::ScenesLock); ScopeLock lock(Level::ScenesLock);
auto& scenes = Level::Scenes; auto& scenes = Level::Scenes;
@@ -643,7 +643,7 @@ public:
void LevelImpl::CallSceneEvent(SceneEventType eventType, Scene* scene, Guid sceneId) void LevelImpl::CallSceneEvent(SceneEventType eventType, Scene* scene, Guid sceneId)
{ {
PROFILE_CPU(); PROFILE_CPU_NAMED("Level::CallSceneEvent");
// Call event // Call event
const auto scriptsDomain = Scripting::GetScriptsDomain(); const auto scriptsDomain = Scripting::GetScriptsDomain();

View File

@@ -189,35 +189,35 @@ bool ScriptingService::Init()
void ScriptingService::Update() void ScriptingService::Update()
{ {
PROFILE_CPU_NAMED("Scripting.Update"); PROFILE_CPU_NAMED("Scripting::Update");
INVOKE_EVENT(Update); INVOKE_EVENT(Update);
} }
void ScriptingService::LateUpdate() void ScriptingService::LateUpdate()
{ {
PROFILE_CPU_NAMED("Scripting.LateUpdate"); PROFILE_CPU_NAMED("Scripting::LateUpdate");
INVOKE_EVENT(LateUpdate); INVOKE_EVENT(LateUpdate);
} }
void ScriptingService::FixedUpdate() void ScriptingService::FixedUpdate()
{ {
PROFILE_CPU_NAMED("Scripting.FixedUpdate"); PROFILE_CPU_NAMED("Scripting::FixedUpdate");
INVOKE_EVENT(FixedUpdate); INVOKE_EVENT(FixedUpdate);
} }
void ScriptingService::Draw() void ScriptingService::Draw()
{ {
PROFILE_CPU_NAMED("Scripting.Draw"); PROFILE_CPU_NAMED("Scripting::Draw");
INVOKE_EVENT(Draw); INVOKE_EVENT(Draw);
} }
void ScriptingService::BeforeExit() void ScriptingService::BeforeExit()
{ {
PROFILE_CPU_NAMED("Scripting.BeforeExit"); PROFILE_CPU_NAMED("Scripting::BeforeExit");
INVOKE_EVENT(Exit); INVOKE_EVENT(Exit);
} }
@@ -639,7 +639,7 @@ MClass* Scripting::FindClass(MonoClass* monoClass)
if (monoClass == nullptr) if (monoClass == nullptr)
return nullptr; return nullptr;
PROFILE_CPU_NAMED("FindClass"); PROFILE_CPU();
auto& modules = BinaryModule::GetModules(); auto& modules = BinaryModule::GetModules();
for (auto module : modules) for (auto module : modules)
@@ -661,7 +661,7 @@ MClass* Scripting::FindClass(const StringAnsiView& fullname)
if (fullname.IsEmpty()) if (fullname.IsEmpty())
return nullptr; return nullptr;
PROFILE_CPU_NAMED("FindClass"); PROFILE_CPU();
auto& modules = BinaryModule::GetModules(); auto& modules = BinaryModule::GetModules();
for (auto module : modules) for (auto module : modules)
@@ -683,7 +683,7 @@ MonoClass* Scripting::FindClassNative(const StringAnsiView& fullname)
if (fullname.IsEmpty()) if (fullname.IsEmpty())
return nullptr; return nullptr;
PROFILE_CPU_NAMED("FindClassNative"); PROFILE_CPU();
auto& modules = BinaryModule::GetModules(); auto& modules = BinaryModule::GetModules();
for (auto module : modules) for (auto module : modules)
@@ -705,7 +705,7 @@ ScriptingTypeHandle Scripting::FindScriptingType(const StringAnsiView& fullname)
if (fullname.IsEmpty()) if (fullname.IsEmpty())
return ScriptingTypeHandle(); return ScriptingTypeHandle();
PROFILE_CPU_NAMED("FindScriptingType"); PROFILE_CPU();
auto& modules = BinaryModule::GetModules(); auto& modules = BinaryModule::GetModules();
for (auto module : modules) for (auto module : modules)
@@ -730,7 +730,7 @@ ScriptingObject* Scripting::FindObject(Guid id, MClass* type)
if (!id.IsValid()) if (!id.IsValid())
return nullptr; return nullptr;
PROFILE_CPU_NAMED("FindObject"); PROFILE_CPU();
// Try to map object id // Try to map object id
const auto idsMapping = ObjectsLookupIdMapping.Get(); const auto idsMapping = ObjectsLookupIdMapping.Get();
@@ -810,7 +810,7 @@ ScriptingObject* Scripting::FindObject(const MonoObject* managedInstance)
if (managedInstance == nullptr) if (managedInstance == nullptr)
return nullptr; return nullptr;
PROFILE_CPU_NAMED("FindObject"); PROFILE_CPU();
// TODO: optimize it by reading the unmanagedPtr or _internalId from managed Object property // TODO: optimize it by reading the unmanagedPtr or _internalId from managed Object property
@@ -827,7 +827,7 @@ ScriptingObject* Scripting::FindObject(const MonoObject* managedInstance)
void Scripting::OnManagedInstanceDeleted(ScriptingObject* obj) void Scripting::OnManagedInstanceDeleted(ScriptingObject* obj)
{ {
PROFILE_CPU_NAMED("OnManagedInstanceDeleted"); PROFILE_CPU();
ASSERT(obj); ASSERT(obj);
// Validate if object still exists // Validate if object still exists