mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
v3dv: Add some CPU tracepoints
Add tracepoints for pipeline creations, bo wait and queue submits. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33012>
This commit is contained in:
parent
986f545744
commit
776795f76a
4 changed files with 19 additions and 0 deletions
|
|
@ -27,6 +27,7 @@
|
|||
#include <sys/mman.h>
|
||||
|
||||
#include "drm-uapi/v3d_drm.h"
|
||||
#include "util/perf/cpu_trace.h"
|
||||
#include "util/u_memory.h"
|
||||
|
||||
/* Default max size of the bo cache, in MB.
|
||||
|
|
@ -313,6 +314,7 @@ v3dv_bo_wait(struct v3dv_device *device,
|
|||
struct v3dv_bo *bo,
|
||||
uint64_t timeout_ns)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct drm_v3d_wait_bo wait = {
|
||||
.handle = bo->handle,
|
||||
.timeout_ns = timeout_ns,
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "broadcom/common/v3d_csd.h"
|
||||
#include "v3dv_private.h"
|
||||
#include "util/perf/cpu_trace.h"
|
||||
#include "util/u_pack_color.h"
|
||||
#include "vk_common_entrypoints.h"
|
||||
#include "vk_util.h"
|
||||
|
|
@ -785,6 +786,7 @@ v3dv_job_init(struct v3dv_job *job,
|
|||
struct v3dv_cmd_buffer *cmd_buffer,
|
||||
int32_t subpass_idx)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
assert(job);
|
||||
|
||||
/* Make sure we haven't made this new job current before calling here */
|
||||
|
|
@ -1109,6 +1111,7 @@ VKAPI_ATTR VkResult VKAPI_CALL
|
|||
v3dv_BeginCommandBuffer(VkCommandBuffer commandBuffer,
|
||||
const VkCommandBufferBeginInfo *pBeginInfo)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
V3DV_FROM_HANDLE(v3dv_cmd_buffer, cmd_buffer, commandBuffer);
|
||||
|
||||
/* If this is the first vkBeginCommandBuffer, we must initialize the
|
||||
|
|
@ -1885,6 +1888,7 @@ v3dv_CmdEndRenderPass2(VkCommandBuffer commandBuffer,
|
|||
VKAPI_ATTR VkResult VKAPI_CALL
|
||||
v3dv_EndCommandBuffer(VkCommandBuffer commandBuffer)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
V3DV_FROM_HANDLE(v3dv_cmd_buffer, cmd_buffer, commandBuffer);
|
||||
|
||||
if (cmd_buffer->state.oom)
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include "util/u_atomic.h"
|
||||
#include "util/os_time.h"
|
||||
#include "util/perf/cpu_trace.h"
|
||||
|
||||
#include "vk_format.h"
|
||||
#include "vk_nir_convert_ycbcr.h"
|
||||
|
|
@ -3027,6 +3028,7 @@ v3dv_CreateGraphicsPipelines(VkDevice _device,
|
|||
const VkAllocationCallbacks *pAllocator,
|
||||
VkPipeline *pPipelines)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
V3DV_FROM_HANDLE(v3dv_device, device, _device);
|
||||
VkResult result = VK_SUCCESS;
|
||||
|
||||
|
|
@ -3291,6 +3293,7 @@ v3dv_CreateComputePipelines(VkDevice _device,
|
|||
const VkAllocationCallbacks *pAllocator,
|
||||
VkPipeline *pPipelines)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
V3DV_FROM_HANDLE(v3dv_device, device, _device);
|
||||
VkResult result = VK_SUCCESS;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include "broadcom/clif/clif_dump.h"
|
||||
#include "util/libsync.h"
|
||||
#include "util/os_time.h"
|
||||
#include "util/perf/cpu_trace.h"
|
||||
#include "vk_drm_syncobj.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
|
@ -298,6 +299,7 @@ handle_reset_query_cpu_job(struct v3dv_queue *queue,
|
|||
struct v3dv_submit_sync_info *sync_info,
|
||||
bool signal_syncs)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct v3dv_device *device = queue->device;
|
||||
struct v3dv_reset_query_cpu_job_info *info = &job->cpu.query_reset;
|
||||
assert(info->pool);
|
||||
|
|
@ -493,6 +495,7 @@ export_perfmon_last_job_sync(struct v3dv_queue *queue, struct v3dv_job *job, int
|
|||
static VkResult
|
||||
handle_end_query_cpu_job(struct v3dv_job *job, uint32_t counter_pass_idx)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
VkResult result = VK_SUCCESS;
|
||||
|
||||
mtx_lock(&job->device->query_mutex);
|
||||
|
|
@ -549,6 +552,7 @@ handle_copy_query_results_cpu_job(struct v3dv_queue *queue,
|
|||
struct v3dv_submit_sync_info *sync_info,
|
||||
bool signal_syncs)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct v3dv_device *device = queue->device;
|
||||
struct v3dv_copy_query_results_cpu_job_info *info =
|
||||
&job->cpu.query_copy_results;
|
||||
|
|
@ -713,6 +717,7 @@ handle_timestamp_query_cpu_job(struct v3dv_queue *queue,
|
|||
struct v3dv_submit_sync_info *sync_info,
|
||||
bool signal_syncs)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct v3dv_device *device = queue->device;
|
||||
|
||||
assert(job->type == V3DV_JOB_TYPE_CPU_TIMESTAMP_QUERY);
|
||||
|
|
@ -817,6 +822,7 @@ handle_csd_indirect_cpu_job(struct v3dv_queue *queue,
|
|||
struct v3dv_submit_sync_info *sync_info,
|
||||
bool signal_syncs)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct v3dv_device *device = queue->device;
|
||||
|
||||
assert(job->type == V3DV_JOB_TYPE_CPU_CSD_INDIRECT);
|
||||
|
|
@ -919,6 +925,7 @@ handle_cl_job(struct v3dv_queue *queue,
|
|||
struct v3dv_submit_sync_info *sync_info,
|
||||
bool signal_syncs)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct v3dv_device *device = queue->device;
|
||||
|
||||
struct drm_v3d_submit_cl submit = { 0 };
|
||||
|
|
@ -1056,6 +1063,7 @@ handle_tfu_job(struct v3dv_queue *queue,
|
|||
struct v3dv_submit_sync_info *sync_info,
|
||||
bool signal_syncs)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
assert(!V3D_DBG(DISABLE_TFU));
|
||||
|
||||
struct v3dv_device *device = queue->device;
|
||||
|
|
@ -1095,6 +1103,7 @@ handle_csd_job(struct v3dv_queue *queue,
|
|||
struct v3dv_submit_sync_info *sync_info,
|
||||
bool signal_syncs)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct v3dv_device *device = queue->device;
|
||||
|
||||
struct drm_v3d_submit_csd *submit = &job->csd.submit;
|
||||
|
|
@ -1234,6 +1243,7 @@ VkResult
|
|||
v3dv_queue_driver_submit(struct vk_queue *vk_queue,
|
||||
struct vk_queue_submit *submit)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct v3dv_queue *queue = container_of(vk_queue, struct v3dv_queue, vk);
|
||||
VkResult result;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue