Hash :
58d7ace2
Author :
Date :
2022-11-22T16:08:07
Vulkan: Add memory allocation log support in debug
* Added a memory tracker to the renderer object to keep track of the
memory allocations and deallocations in more detail.
* This feature is used for debugging only.
* To enable it, set angle_enable_memory_alloc_logging=true in GN args
(added in renderer/vulkan/BUILD).
* It is related to ANGLE_ENABLE_MEMORY_ALLOC_LOGGING in the code.
* The tracker are updated in the memory allocation tracking functions
if the feature is enabled. (The counter is always updated, even if
the feature is disabled.)
* At the end of a RendererVk object, it checks for and logs any
remaining allocated memory from MemoryAllocationType members.
* The data is stored in the map object "mMemoryAllocationTracker".
The key used for it is currently of type angle::BacktraceInfo.
* If angle_enable_unwind_backtrace_support is disabled, or not on
Android, the key is an empty object.
* MemoryAllocInfoMapKey is used as a key to access the allocation
information.
Bug: b/242641395
Change-Id: If701a4bdea2f8738a830ee47e0c7c5cdacf95b87
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4050103
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>