Module: Mesa
Branch: main
Commit: 63b1290c2f30ae6b6c40dd0092306564a33686e3
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=63b1290c2f30ae6b6c40dd0092306564a33686e3

Author: Chia-I Wu <[email protected]>
Date:   Thu Aug 25 17:09:43 2022 -0700

turnip: add some cpu tracepionts

Add tracepoints for pipeline creations and queue submits.

Reviewed-by: Emma Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18262>

---

 src/freedreno/vulkan/tu_common.h   | 1 +
 src/freedreno/vulkan/tu_drm.c      | 1 +
 src/freedreno/vulkan/tu_kgsl.c     | 1 +
 src/freedreno/vulkan/tu_pipeline.c | 2 ++
 4 files changed, 5 insertions(+)

diff --git a/src/freedreno/vulkan/tu_common.h b/src/freedreno/vulkan/tu_common.h
index bffed1d4914..1a0bbe8efe9 100644
--- a/src/freedreno/vulkan/tu_common.h
+++ b/src/freedreno/vulkan/tu_common.h
@@ -33,6 +33,7 @@
 #include "util/list.h"
 #include "util/log.h"
 #include "util/macros.h"
+#include "util/perf/cpu_trace.h"
 #include "util/sparse_array.h"
 #include "util/u_atomic.h"
 #include "util/u_dynarray.h"
diff --git a/src/freedreno/vulkan/tu_drm.c b/src/freedreno/vulkan/tu_drm.c
index 87f0352cf36..894cb2f9788 100644
--- a/src/freedreno/vulkan/tu_drm.c
+++ b/src/freedreno/vulkan/tu_drm.c
@@ -1227,6 +1227,7 @@ tu_device_wait_u_trace(struct tu_device *dev, struct 
tu_u_trace_syncobj *syncobj
 VkResult
 tu_queue_submit(struct vk_queue *vk_queue, struct vk_queue_submit *submit)
 {
+   MESA_TRACE_FUNC();
    struct tu_queue *queue = container_of(vk_queue, struct tu_queue, vk);
    uint32_t perf_pass_index = queue->device->perfcntrs_pass_cs ?
                               submit->perf_pass_index : ~0;
diff --git a/src/freedreno/vulkan/tu_kgsl.c b/src/freedreno/vulkan/tu_kgsl.c
index 1e3204f12d3..5edcf18d6d3 100644
--- a/src/freedreno/vulkan/tu_kgsl.c
+++ b/src/freedreno/vulkan/tu_kgsl.c
@@ -358,6 +358,7 @@ tu_QueueSubmit2(VkQueue _queue,
                 const VkSubmitInfo2 *pSubmits,
                 VkFence _fence)
 {
+   MESA_TRACE_FUNC();
    TU_FROM_HANDLE(tu_queue, queue, _queue);
    TU_FROM_HANDLE(tu_syncobj, fence, _fence);
    VkResult result = VK_SUCCESS;
diff --git a/src/freedreno/vulkan/tu_pipeline.c 
b/src/freedreno/vulkan/tu_pipeline.c
index f809e9d710d..f26cbe19133 100644
--- a/src/freedreno/vulkan/tu_pipeline.c
+++ b/src/freedreno/vulkan/tu_pipeline.c
@@ -4155,6 +4155,7 @@ tu_CreateGraphicsPipelines(VkDevice device,
                            const VkAllocationCallbacks *pAllocator,
                            VkPipeline *pPipelines)
 {
+   MESA_TRACE_FUNC();
    VkResult final_result = VK_SUCCESS;
    uint32_t i = 0;
 
@@ -4362,6 +4363,7 @@ tu_CreateComputePipelines(VkDevice device,
                           const VkAllocationCallbacks *pAllocator,
                           VkPipeline *pPipelines)
 {
+   MESA_TRACE_FUNC();
    VkResult final_result = VK_SUCCESS;
    uint32_t i = 0;
 

Reply via email to