From: "Christian König" <christian.koenig@amd.com>
To: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>,
Sumit Semwal <sumit.semwal@linaro.org>,
Gustavo Padovan <gustavo@padovan.org>,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org,
linux-trace-kernel@vger.kernel.org,
Alex Deucher <alexander.deucher@amd.com>,
amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 4/6] drm/amdgpu: add BO clear event
Date: Wed, 14 Feb 2024 13:06:35 +0100 [thread overview]
Message-ID: <e4139f49-1fcc-4200-9741-e17564624e1e@amd.com> (raw)
In-Reply-To: <20240213155112.156537-5-pierre-eric.pelloux-prayer@amd.com>
Am 13.02.24 um 16:50 schrieb Pierre-Eric Pelloux-Prayer:
> Useful to identify why sdma jobs are submitted.
>
> Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++
> drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 16 ++++++++++++++++
> 2 files changed, 18 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 425cebcc5cbf..7219f329d6f0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -631,6 +631,8 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
> bo->tbo.resource->mem_type == TTM_PL_VRAM) {
> struct dma_fence *fence;
>
> + trace_amdgpu_bo_clear(bo);
> +
Might be better to put this into amdgpu_fill_buffer() since we have
other users of that IIRC.
Apart from that looks good to me,
Christian.
> r = amdgpu_fill_buffer(bo, 0, bo->tbo.base.resv, &fence, true);
> if (unlikely(r))
> goto fail_unreserve;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
> index f539b1d00234..e8ea1cfe7027 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
> @@ -514,6 +514,22 @@ TRACE_EVENT(amdgpu_bo_move,
> __entry->new_placement, __entry->bo_size)
> );
>
> +TRACE_EVENT(amdgpu_bo_clear,
> + TP_PROTO(struct amdgpu_bo *bo),
> + TP_ARGS(bo),
> + TP_STRUCT__entry(
> + __field(struct amdgpu_bo *, bo)
> + __field(u64, bo_size)
> + ),
> +
> + TP_fast_assign(
> + __entry->bo = bo;
> + __entry->bo_size = amdgpu_bo_size(bo);
> + ),
> + TP_printk("bo=%p, size=%lld",
> + __entry->bo, __entry->bo_size)
> +);
> +
> TRACE_EVENT(amdgpu_ib_pipe_sync,
> TP_PROTO(struct amdgpu_job *sched_job, struct dma_fence *fence),
> TP_ARGS(sched_job, fence),
next prev parent reply other threads:[~2024-02-14 12:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 18:41 [PATCH 1/2] tracing, dma-buf: add a trace_dma_fence_sync_to event Pierre-Eric Pelloux-Prayer
2024-01-17 18:41 ` [PATCH 2/2] amdgpu: use trace_dma_fence_sync_to in amdgpu_fence_sync Pierre-Eric Pelloux-Prayer
2024-02-13 15:50 ` [PATCH v2 0/6] dma-fence, drm, amdgpu new trace events Pierre-Eric Pelloux-Prayer
2024-02-13 15:50 ` [PATCH v2 1/6] tracing, dma-buf: add a trace_dma_fence_sync_to event Pierre-Eric Pelloux-Prayer
2024-02-14 12:00 ` Christian König
2024-02-14 15:10 ` Steven Rostedt
2024-02-14 16:54 ` Pierre-Eric Pelloux-Prayer
2024-02-16 16:32 ` Daniel Vetter
2024-02-16 16:51 ` Christian König
2024-02-16 18:02 ` Daniel Vetter
2024-02-13 15:50 ` [PATCH v2 2/6] dma-buf/fence-chain: use trace_dma_fence_sync_to Pierre-Eric Pelloux-Prayer
2024-02-13 15:50 ` [PATCH v2 3/6] amdgpu: use trace_dma_fence_sync_to in amdgpu_fence_sync Pierre-Eric Pelloux-Prayer
2024-02-14 12:10 ` Christian König
2024-02-13 15:50 ` [PATCH v2 4/6] drm/amdgpu: add BO clear event Pierre-Eric Pelloux-Prayer
2024-02-14 12:06 ` Christian König [this message]
2024-02-13 15:50 ` [PATCH v2 5/6] drm/amdgpu: add a amdgpu_cs_ioctl2 event Pierre-Eric Pelloux-Prayer
2024-02-14 12:09 ` Christian König
2024-02-14 16:38 ` Pierre-Eric Pelloux-Prayer
2024-02-14 16:45 ` Christian König
2024-02-13 15:50 ` [PATCH v2 6/6] drm: add drm_mode_atomic_commit event Pierre-Eric Pelloux-Prayer
2024-02-13 16:20 ` Steven Rostedt
2024-02-16 16:37 ` Daniel Vetter
2024-02-16 16:44 ` Steven Rostedt
2024-02-16 16:25 ` [PATCH v2 0/6] dma-fence, drm, amdgpu new trace events Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e4139f49-1fcc-4200-9741-e17564624e1e@amd.com \
--to=christian.koenig@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo@padovan.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=pierre-eric.pelloux-prayer@amd.com \
--cc=rostedt@goodmis.org \
--cc=sumit.semwal@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox