From: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
To: "Luben Tuikov" <ltuikov89@gmail.com>,
"Matthew Brost" <matthew.brost@intel.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Philipp Stanner" <pstanner@redhat.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Christian König" <christian.koenig@amd.com>
Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<linux-media@vger.kernel.org>, <linaro-mm-sig@lists.linaro.org>
Subject: [PATCH v7 4/7] drm/sched: cleanup gpu_scheduler trace events
Date: Fri, 31 Jan 2025 12:03:02 +0100 [thread overview]
Message-ID: <20250131110328.706695-5-pierre-eric.pelloux-prayer@amd.com> (raw)
In-Reply-To: <20250131110328.706695-1-pierre-eric.pelloux-prayer@amd.com>
A fence uniquely identify a job, so this commits updates the places
where a kernel pointer was used as an identifier by:
"fence=%llu:%llu"
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
---
.../gpu/drm/scheduler/gpu_scheduler_trace.h | 41 +++++++++++--------
1 file changed, 23 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h b/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
index c4ec28540656..3cdd8d8f8021 100644
--- a/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
+++ b/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
@@ -36,28 +36,29 @@ DECLARE_EVENT_CLASS(drm_sched_job,
TP_PROTO(struct drm_sched_job *sched_job, struct drm_sched_entity *entity),
TP_ARGS(sched_job, entity),
TP_STRUCT__entry(
- __field(struct drm_sched_entity *, entity)
- __field(struct dma_fence *, fence)
- __string(name, sched_job->sched->name)
__field(uint64_t, id)
+ __string(name, sched_job->sched->name)
__field(u32, job_count)
__field(int, hw_job_count)
__string(dev, dev_name(sched_job->sched->dev))
+ __field(uint64_t, fence_context)
+ __field(uint64_t, fence_seqno)
),
TP_fast_assign(
- __entry->entity = entity;
__entry->id = sched_job->id;
- __entry->fence = &sched_job->s_fence->finished;
__assign_str(name);
__entry->job_count = spsc_queue_count(&entity->job_queue);
__entry->hw_job_count = atomic_read(
&sched_job->sched->credit_count);
__assign_str(dev);
+ __entry->fence_context = sched_job->s_fence->finished.context;
+ __entry->fence_seqno = sched_job->s_fence->finished.seqno;
+
),
- TP_printk("dev=%s, entity=%p, id=%llu, fence=%p, ring=%s, job count:%u, hw job count:%d",
- __get_str(dev), __entry->entity, __entry->id,
- __entry->fence, __get_str(name),
+ TP_printk("dev=%s, id=%llu, fence=%llu:%llu, ring=%s, job count:%u, hw job count:%d",
+ __get_str(dev), __entry->id,
+ __entry->fence_context, __entry->fence_seqno, __get_str(name),
__entry->job_count, __entry->hw_job_count)
);
@@ -75,37 +76,41 @@ TRACE_EVENT(drm_sched_process_job,
TP_PROTO(struct drm_sched_fence *fence),
TP_ARGS(fence),
TP_STRUCT__entry(
- __field(struct dma_fence *, fence)
+ __field(uint64_t, fence_context)
+ __field(uint64_t, fence_seqno)
),
TP_fast_assign(
- __entry->fence = &fence->finished;
+ __entry->fence_context = fence->finished.context;
+ __entry->fence_seqno = fence->finished.seqno;
),
- TP_printk("fence=%p signaled", __entry->fence)
+ TP_printk("fence=%llu:%llu signaled",
+ __entry->fence_context, __entry->fence_seqno)
);
TRACE_EVENT(drm_sched_job_wait_dep,
TP_PROTO(struct drm_sched_job *sched_job, struct dma_fence *fence),
TP_ARGS(sched_job, fence),
TP_STRUCT__entry(
- __string(name, sched_job->sched->name)
+ __field(uint64_t, fence_context)
+ __field(uint64_t, fence_seqno)
__field(uint64_t, id)
__field(struct dma_fence *, fence)
__field(uint64_t, ctx)
- __field(unsigned, seqno)
+ __field(uint64_t, seqno)
),
TP_fast_assign(
- __assign_str(name);
+ __entry->fence_context = sched_job->s_fence->finished.context;
+ __entry->fence_seqno = sched_job->s_fence->finished.seqno;
__entry->id = sched_job->id;
__entry->fence = fence;
__entry->ctx = fence->context;
__entry->seqno = fence->seqno;
),
- TP_printk("job ring=%s, id=%llu, depends fence=%p, context=%llu, seq=%u",
- __get_str(name), __entry->id,
- __entry->fence, __entry->ctx,
- __entry->seqno)
+ TP_printk("fence=%llu:%llu, id=%llu, dependencies:{fence=%llu:%llu}",
+ __entry->fence_context, __entry->fence_seqno, __entry->id,
+ __entry->ctx, __entry->seqno)
);
#endif
--
2.47.1
next prev parent reply other threads:[~2025-01-31 11:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-31 11:02 [PATCH v7 0/7] Improve gpu_scheduler trace events + uAPI Pierre-Eric Pelloux-Prayer
2025-01-31 11:02 ` [PATCH v7 1/7] drm/debugfs: output client_id in in drm_clients_info Pierre-Eric Pelloux-Prayer
2025-01-31 11:03 ` [PATCH v7 2/7] drm/sched: store the drm client_id in drm_sched_fence Pierre-Eric Pelloux-Prayer
2025-01-31 11:03 ` [PATCH v7 3/7] drm/sched: add device name to the drm_sched_process_job event Pierre-Eric Pelloux-Prayer
2025-01-31 11:03 ` Pierre-Eric Pelloux-Prayer [this message]
2025-02-04 15:22 ` [PATCH v7 4/7] drm/sched: cleanup gpu_scheduler trace events Tvrtko Ursulin
2025-01-31 11:03 ` [PATCH v7 5/7] drm/sched: trace dependencies for gpu jobs Pierre-Eric Pelloux-Prayer
2025-02-04 15:31 ` Tvrtko Ursulin
2025-01-31 11:03 ` [PATCH v7 6/7] drm/sched: add the drm_client_id to the drm_sched_run/exec_job events Pierre-Eric Pelloux-Prayer
2025-01-31 11:03 ` [PATCH v7 7/7] drm/doc: document some tracepoints as uAPI Pierre-Eric Pelloux-Prayer
2025-01-31 13:12 ` [PATCH v7 0/7] Improve gpu_scheduler trace events + uAPI Christian König
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=20250131110328.706695-5-pierre-eric.pelloux-prayer@amd.com \
--to=pierre-eric.pelloux-prayer@amd.com \
--cc=airlied@gmail.com \
--cc=christian.koenig@amd.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=ltuikov89@gmail.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.brost@intel.com \
--cc=mripard@kernel.org \
--cc=pstanner@redhat.com \
--cc=simona@ffwll.ch \
--cc=sumit.semwal@linaro.org \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®