Deprecate profiler categories based on global enum

(to be supplanted by registered budgets in the future)

Signed-off-by: Jeremy Ong <jcong@amazon.com>
This commit is contained in:
Jeremy Ong
2021-08-17 12:10:57 -06:00
parent d15d40fec6
commit df9b4d4a2f
274 changed files with 1435 additions and 1965 deletions
@@ -115,7 +115,7 @@ namespace Audio
void CAudioSystem::PushRequestBlocking(const SAudioRequest& audioRequestData)
{
// Main Thread!
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
CAudioRequestInternal request(audioRequestData);
@@ -201,7 +201,7 @@ namespace Audio
void CAudioSystem::InternalUpdate()
{
// Audio Thread!
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
auto startUpdateTime = AZStd::chrono::system_clock::now(); // stamp the start time
@@ -225,7 +225,7 @@ namespace Audio
#if !defined(AUDIO_RELEASE)
#if defined(PROVIDE_GETNAME_SUPPORT)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Audio, "Sync Debug Name Changes");
AZ_PROFILE_SCOPE(Audio, "Sync Debug Name Changes");
AZStd::lock_guard<AZStd::mutex> lock(m_debugNameStoreMutex);
m_debugNameStore.SyncChanges(m_oATL.GetDebugStore());
}
@@ -238,7 +238,7 @@ namespace Audio
auto elapsedUpdateTime = AZStd::chrono::duration_cast<duration_ms>(endUpdateTime - startUpdateTime);
if (elapsedUpdateTime < m_targetUpdatePeriod)
{
AZ_PROFILE_SCOPE_IDLE(AZ::Debug::ProfileCategory::Audio, "Wait Remaining Time in Update Period");
AZ_PROFILE_SCOPE(Audio, "Wait Remaining Time in Update Period");
m_processingEvent.try_acquire_for(m_targetUpdatePeriod - elapsedUpdateTime);
}
}
@@ -596,7 +596,7 @@ namespace Audio
///////////////////////////////////////////////////////////////////////////////////////////////////
void CAudioSystem::ProcessRequestBlocking(CAudioRequestInternal& request)
{
AZ_PROFILE_FUNCTION_STALL(AZ::Debug::ProfileCategory::Audio);
AZ_PROFILE_FUNCTION(Audio);
if (m_oATL.CanProcessRequests())
{
@@ -616,7 +616,7 @@ namespace Audio
void CAudioSystem::ProcessRequestThreadSafe(CAudioRequestInternal request)
{
// Audio Thread!
AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::Audio, "Thread-Safe Request: %s", request.ToString().c_str());
AZ_PROFILE_SCOPE(Audio, "Thread-Safe Request: %s", request.ToString().c_str());
if (m_oATL.CanProcessRequests())
{
@@ -641,7 +641,7 @@ namespace Audio
{
// Todo: This should handle request priority, use request priority as bus Address and process in priority order.
AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::Audio, "Normal Request: %s", request.ToString().c_str());
AZ_PROFILE_SCOPE(Audio, "Normal Request: %s", request.ToString().c_str());
AZ_Assert(g_mainThreadId != AZStd::this_thread::get_id(), "AudioSystem::ProcessRequestByPriority - called from Main thread!");
@@ -672,7 +672,7 @@ namespace Audio
{
if (!(request.nInternalInfoFlags & eARIF_WAITING_FOR_REMOVAL))
{
AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::Audio, "Blocking Request: %s", request.ToString().c_str());
AZ_PROFILE_SCOPE(Audio, "Blocking Request: %s", request.ToString().c_str());
if (request.eStatus == eARS_NONE)
{