venus: add more tracepoints for perf analysis

This change adds the tracepoints that can help understand app behavior
for debugging and performance optimization purposes.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17497>
This commit is contained in:
Yiwei Zhang
2022-07-12 06:31:37 +00:00
committed by Marge Bot
parent f96e25ae05
commit 62f79f9ec1
11 changed files with 61 additions and 0 deletions
+7
View File
@@ -439,6 +439,7 @@ vn_CreateCommandPool(VkDevice device,
const VkAllocationCallbacks *pAllocator,
VkCommandPool *pCommandPool)
{
VN_TRACE_FUNC();
struct vn_device *dev = vn_device_from_handle(device);
const VkAllocationCallbacks *alloc =
pAllocator ? pAllocator : &dev->base.base.alloc;
@@ -469,6 +470,7 @@ vn_DestroyCommandPool(VkDevice device,
VkCommandPool commandPool,
const VkAllocationCallbacks *pAllocator)
{
VN_TRACE_FUNC();
struct vn_device *dev = vn_device_from_handle(device);
struct vn_command_pool *pool = vn_command_pool_from_handle(commandPool);
const VkAllocationCallbacks *alloc;
@@ -501,6 +503,7 @@ vn_ResetCommandPool(VkDevice device,
VkCommandPool commandPool,
VkCommandPoolResetFlags flags)
{
VN_TRACE_FUNC();
struct vn_device *dev = vn_device_from_handle(device);
struct vn_command_pool *pool = vn_command_pool_from_handle(commandPool);
@@ -520,6 +523,7 @@ vn_TrimCommandPool(VkDevice device,
VkCommandPool commandPool,
VkCommandPoolTrimFlags flags)
{
VN_TRACE_FUNC();
struct vn_device *dev = vn_device_from_handle(device);
vn_async_vkTrimCommandPool(dev->instance, device, commandPool, flags);
@@ -532,6 +536,7 @@ vn_AllocateCommandBuffers(VkDevice device,
const VkCommandBufferAllocateInfo *pAllocateInfo,
VkCommandBuffer *pCommandBuffers)
{
VN_TRACE_FUNC();
struct vn_device *dev = vn_device_from_handle(device);
struct vn_command_pool *pool =
vn_command_pool_from_handle(pAllocateInfo->commandPool);
@@ -583,6 +588,7 @@ vn_FreeCommandBuffers(VkDevice device,
uint32_t commandBufferCount,
const VkCommandBuffer *pCommandBuffers)
{
VN_TRACE_FUNC();
struct vn_device *dev = vn_device_from_handle(device);
struct vn_command_pool *pool = vn_command_pool_from_handle(commandPool);
const VkAllocationCallbacks *alloc = &pool->allocator;
@@ -612,6 +618,7 @@ VkResult
vn_ResetCommandBuffer(VkCommandBuffer commandBuffer,
VkCommandBufferResetFlags flags)
{
VN_TRACE_FUNC();
struct vn_command_buffer *cmd =
vn_command_buffer_from_handle(commandBuffer);