Merge branch 'development' into cmake/SPEC-2513_w4244

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/CryEditDoc.cpp
#	Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputManager.cpp
#	Gems/Atom/Feature/Common/Code/Source/PostProcessing/BlendColorGradingLutsPass.cpp
#	Gems/PhysXDebug/Code/Source/SystemComponent.cpp
This commit is contained in:
Esteban Papp
2021-08-19 08:53:41 -07:00
370 changed files with 3276 additions and 4248 deletions
+6 -13
View File
@@ -43,32 +43,25 @@ enum EProfiledSubsystem
};
#undef X
static_assert(static_cast<AZ::Debug::ProfileCategory>(PROFILE_LAST_SUBSYSTEM) == AZ::Debug::ProfileCategory::LegacyLast, "Mismatched AZ and Legacy profile categories");
#include <AzCore/Debug/EventTrace.h>
#define FUNCTION_PROFILER_LEGACYONLY(pISystem, subsystem)
#define FUNCTION_PROFILER(pISystem, subsystem) \
AZ_PROFILE_FUNCTION(static_cast<AZ::Debug::ProfileCategory>(subsystem));
#define FUNCTION_PROFILER(pISystem, subsystem)
#define FUNCTION_PROFILER_FAST(pISystem, subsystem, bProfileEnabled) \
AZ_PROFILE_FUNCTION(static_cast<AZ::Debug::ProfileCategory>(subsystem));
#define FUNCTION_PROFILER_FAST(pISystem, subsystem, bProfileEnabled)
#define FUNCTION_PROFILER_ALWAYS(pISystem, subsystem) \
AZ_PROFILE_FUNCTION(static_cast<AZ::Debug::ProfileCategory>(subsystem));
#define FUNCTION_PROFILER_ALWAYS(pISystem, subsystem)
#define FRAME_PROFILER_LEGACYONLY(szProfilerName, pISystem, subsystem)
#define FRAME_PROFILER(szProfilerName, pISystem, subsystem) \
AZ_PROFILE_SCOPE(static_cast<AZ::Debug::ProfileCategory>(subsystem), szProfilerName);
#define FRAME_PROFILER(szProfilerName, pISystem, subsystem)
#define FRAME_PROFILER_FAST(szProfilerName, pISystem, subsystem, bProfileEnabled) \
AZ_PROFILE_SCOPE(static_cast<AZ::Debug::ProfileCategory>(subsystem), szProfilerName);
#define FRAME_PROFILER_FAST(szProfilerName, pISystem, subsystem, bProfileEnabled)
#define FUNCTION_PROFILER_SYS(subsystem) \
FUNCTION_PROFILER(gEnv->pSystem, PROFILE_##subsystem)
#define FUNCTION_PROFILER_SYS(subsystem)
#define STALL_PROFILER(cause)
-11
View File
@@ -1149,22 +1149,11 @@ struct DiskOperationInfo
#endif
#if defined(ENABLE_LOADING_PROFILER) && AZ_PROFILE_TELEMETRY
#define LOADING_TIME_PROFILE_SECTION AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzCore)
#define LOADING_TIME_PROFILE_SECTION_ARGS(...) AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::AzCore, __VA_ARGS__)
#define LOADING_TIME_PROFILE_SECTION_NAMED(sectionName) AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzCore, sectionName)
#define LOADING_TIME_PROFILE_SECTION_NAMED_ARGS(sectionName, ...) AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::AzCore, sectionName, __VA_ARGS__)
#else
#define LOADING_TIME_PROFILE_SECTION
#define LOADING_TIME_PROFILE_SECTION_ARGS(...)
#define LOADING_TIME_PROFILE_SECTION_NAMED(sectionName)
#define LOADING_TIME_PROFILE_SECTION_NAMED_ARGS(sectionName, ...)
#endif
//////////////////////////////////////////////////////////////////////////
// CrySystem DLL Exports.
//////////////////////////////////////////////////////////////////////////
+4 -4
View File
@@ -69,7 +69,7 @@ namespace AZ
}
pointer_type ptr = m_schema->Allocate(byteSize, alignment, flags, name, fileName, lineNum, suppressStackRecord);
AZ_PROFILE_MEMORY_ALLOC_EX(AZ::Debug::ProfileCategory::MemoryReserved, fileName, lineNum, ptr, byteSize, name ? name : GetName());
AZ_PROFILE_MEMORY_ALLOC_EX(MemoryReserved, fileName, lineNum, ptr, byteSize, name ? name : GetName());
AZ_MEMORY_PROFILE(ProfileAllocation(ptr, byteSize, alignment, name, fileName, lineNum, suppressStackRecord));
AZ_Assert(ptr || byteSize == 0, "OOM - Failed to allocate %zu bytes from LegacyAllocator", byteSize);
return ptr;
@@ -78,7 +78,7 @@ namespace AZ
// DeAllocate with file/line, to track when allocs were freed from Cry
void DeAllocate(pointer_type ptr, [[maybe_unused]] const char* file, [[maybe_unused]] const int line, size_type byteSize = 0, size_type alignment = 0)
{
AZ_PROFILE_MEMORY_FREE_EX(AZ::Debug::ProfileCategory::MemoryReserved, file, line, ptr);
AZ_PROFILE_MEMORY_FREE_EX(MemoryReserved, file, line, ptr);
AZ_MEMORY_PROFILE(ProfileDeallocation(ptr, byteSize, alignment, nullptr));
m_schema->DeAllocate(ptr, byteSize, alignment);
}
@@ -94,9 +94,9 @@ namespace AZ
}
AZ_MEMORY_PROFILE(ProfileReallocationBegin(ptr, newSize));
AZ_PROFILE_MEMORY_FREE_EX(AZ::Debug::ProfileCategory::MemoryReserved, file, line, ptr);
AZ_PROFILE_MEMORY_FREE_EX(MemoryReserved, file, line, ptr);
pointer_type newPtr = m_schema->ReAllocate(ptr, newSize, newAlignment);
AZ_PROFILE_MEMORY_ALLOC_EX(AZ::Debug::ProfileCategory::MemoryReserved, file, line, newPtr, newSize, "LegacyAllocator Realloc");
AZ_PROFILE_MEMORY_ALLOC_EX(MemoryReserved, file, line, newPtr, newSize, "LegacyAllocator Realloc");
AZ_MEMORY_PROFILE(ProfileReallocationEnd(ptr, newPtr, newSize, newAlignment));
AZ_Assert(newPtr || newSize == 0, "OOM - Failed to reallocate %zu bytes from LegacyAllocator", newSize);
return newPtr;
-1
View File
@@ -173,7 +173,6 @@
#if defined(ENABLE_PROFILING_CODE)
#define USE_DISK_PROFILER
#define ENABLE_LOADING_PROFILER // requires AZ_PROFILE_TELEMETRY to also be defined
#endif
// The maximum number of joints in an animation
+1 -3
View File
@@ -13,7 +13,6 @@
#include <IConsole.h>
#include <AzCore/Debug/Profiler.h>
#include <AzCore/Debug/ProfileModuleInit.h>
#include <AzCore/Memory/AllocatorManager.h>
#include <AzCore/Module/Environment.h>
#include <AzCore/std/string/conversions.h>
@@ -94,7 +93,6 @@ extern "C" AZ_DLL_EXPORT void ModuleInitISystem(ISystem* pSystem, [[maybe_unused
AZ::Environment::Attach(gEnv->pSharedEnvironment);
AZ::AllocatorManager::Instance(); // Force the AllocatorManager to instantiate and register any allocators defined in data sections
}
AZ::Debug::ProfileModuleInit();
} // if pSystem
}
@@ -203,7 +201,7 @@ void __stl_debug_message(const char* format_str, ...)
//////////////////////////////////////////////////////////////////////////
void CrySleep(unsigned int dwMilliseconds)
{
AZ_PROFILE_FUNCTION_IDLE(AZ::Debug::ProfileCategory::System);
AZ_PROFILE_FUNCTION(System);
Sleep(dwMilliseconds);
}
+1 -1
View File
@@ -701,7 +701,7 @@ void CSystem::SleepIfNeeded()
int sleepMS = (int)(1000.0f * sleepTime + 0.5f);
if (sleepMS > 0)
{
AZ_PROFILE_FUNCTION_IDLE(AZ::Debug::ProfileCategory::System);
AZ_PROFILE_FUNCTION(System);
Sleep(sleepMS);
}