From: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
To: "Matthew Brost" <matthew.brost@intel.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Philipp Stanner" <phasta@kernel.org>,
"Christian König" <ckoenig.leichtzumerken@gmail.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>
Cc: "Pierre-Eric Pelloux-Prayer" <pierre-eric.pelloux-prayer@amd.com>,
"Christian König" <christian.koenig@amd.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH v10 06/10] drm/sched: Add the drm_client_id to the drm_sched_run/exec_job events
Date: Wed, 21 May 2025 17:45:08 +0200 [thread overview]
Message-ID: <20250521154531.10541-7-pierre-eric.pelloux-prayer@amd.com> (raw)
In-Reply-To: <20250521154531.10541-1-pierre-eric.pelloux-prayer@amd.com>
For processes with multiple drm_file instances, the drm_client_id is
the only way to map jobs back to their unique owner.
It's even more useful if drm client_name is set, because now a tool
can map jobs to the client name instead of only having access to
the process name.
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Philipp Stanner <phasta@kernel.org>
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
---
drivers/gpu/drm/scheduler/gpu_scheduler_trace.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h b/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
index 5d9992ad47d3..38cdd659a286 100644
--- a/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
+++ b/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
@@ -43,6 +43,7 @@ DECLARE_EVENT_CLASS(drm_sched_job,
__string(dev, dev_name(sched_job->sched->dev))
__field(u64, fence_context)
__field(u64, fence_seqno)
+ __field(u64, client_id)
),
TP_fast_assign(
@@ -54,11 +55,12 @@ DECLARE_EVENT_CLASS(drm_sched_job,
__assign_str(dev);
__entry->fence_context = sched_job->s_fence->finished.context;
__entry->fence_seqno = sched_job->s_fence->finished.seqno;
+ __entry->client_id = sched_job->s_fence->drm_client_id;
),
- TP_printk("dev=%s, id=%llu, fence=%llu:%llu, ring=%s, job count:%u, hw job count:%d",
+ TP_printk("dev=%s, id=%llu, fence=%llu:%llu, ring=%s, job count:%u, hw job count:%d, client_id:%llu",
__get_str(dev), __entry->id,
__entry->fence_context, __entry->fence_seqno, __get_str(name),
- __entry->job_count, __entry->hw_job_count)
+ __entry->job_count, __entry->hw_job_count, __entry->client_id)
);
DEFINE_EVENT(drm_sched_job, drm_sched_job,
--
2.43.0
next prev parent reply other threads:[~2025-05-21 15:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 15:45 [PATCH v10 00/10] Improve gpu_scheduler trace events + UAPI Pierre-Eric Pelloux-Prayer
2025-05-21 15:45 ` [PATCH v10 01/10] drm/debugfs: Output client_id in in drm_clients_info Pierre-Eric Pelloux-Prayer
2025-05-21 15:45 ` [PATCH v10 02/10] drm/sched: Store the drm client_id in drm_sched_fence Pierre-Eric Pelloux-Prayer
2025-05-21 15:45 ` [PATCH v10 03/10] drm/sched: Add device name to the drm_sched_process_job event Pierre-Eric Pelloux-Prayer
2025-05-21 15:45 ` [PATCH v10 04/10] drm/sched: Cleanup gpu_scheduler trace events Pierre-Eric Pelloux-Prayer
2025-05-21 15:45 ` [PATCH v10 05/10] drm/sched: Trace dependencies for GPU jobs Pierre-Eric Pelloux-Prayer
2025-05-21 15:45 ` Pierre-Eric Pelloux-Prayer [this message]
2025-05-21 15:45 ` [PATCH v10 07/10] drm/sched: Cleanup event names Pierre-Eric Pelloux-Prayer
2025-05-21 15:45 ` [PATCH v10 08/10] drm: Get rid of drm_sched_job.id Pierre-Eric Pelloux-Prayer
2025-05-22 2:27 ` kernel test robot
2025-05-21 15:45 ` [PATCH v10 09/10] drm/doc: Document some tracepoints as uAPI Pierre-Eric Pelloux-Prayer
2025-05-21 15:45 ` [PATCH v10 10/10] drm/amdgpu: update trace format to match gpu_scheduler_trace Pierre-Eric Pelloux-Prayer
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=20250521154531.10541-7-pierre-eric.pelloux-prayer@amd.com \
--to=pierre-eric.pelloux-prayer@amd.com \
--cc=airlied@gmail.com \
--cc=christian.koenig@amd.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.brost@intel.com \
--cc=mripard@kernel.org \
--cc=phasta@kernel.org \
--cc=simona@ffwll.ch \
--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