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>
Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH v7 6/7] drm/sched: add the drm_client_id to the drm_sched_run/exec_job events
Date: Fri, 31 Jan 2025 12:03:04 +0100 [thread overview]
Message-ID: <20250131110328.706695-7-pierre-eric.pelloux-prayer@amd.com> (raw)
In-Reply-To: <20250131110328.706695-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.
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
---
drivers/gpu/drm/scheduler/gpu_scheduler_trace.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h b/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
index ca19cd9a146a..5c740cb80037 100644
--- a/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
+++ b/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h
@@ -71,6 +71,7 @@ DECLARE_EVENT_CLASS(drm_sched_job,
__field(uint64_t, fence_seqno)
__field(int, n_deps)
__dynamic_array(u64, deps, dep_count * 2)
+ __field(u64, client_id)
),
TP_fast_assign(
@@ -93,12 +94,14 @@ DECLARE_EVENT_CLASS(drm_sched_job,
dyn_arr[2 * idx + 1] = fence->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, dependencies:%s",
+ TP_printk("dev=%s, id=%llu, fence=%llu:%llu, ring=%s, job count:%u, hw job count:%d, dependencies:%s, client_id:%lld",
__get_str(dev), __entry->id,
__entry->fence_context, __entry->fence_seqno, __get_str(name),
__entry->job_count, __entry->hw_job_count,
- __print_dma_fence_array(p, __get_dynamic_array(deps), __entry->n_deps))
+ __print_dma_fence_array(p, __get_dynamic_array(deps), __entry->n_deps),
+ __entry->client_id)
);
DEFINE_EVENT(drm_sched_job, drm_sched_job,
--
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 ` [PATCH v7 4/7] drm/sched: cleanup gpu_scheduler trace events Pierre-Eric Pelloux-Prayer
2025-02-04 15:22 ` 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 ` Pierre-Eric Pelloux-Prayer [this message]
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-7-pierre-eric.pelloux-prayer@amd.com \
--to=pierre-eric.pelloux-prayer@amd.com \
--cc=airlied@gmail.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@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=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®