From: Andrzej Hajda <andrzej.hajda@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
Priyanka Dandamudi <priyanka.dandamudi@intel.com>,
Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>,
Jan Maslak <jan.maslak@intel.com>,
Andrzej Hajda <andrzej.hajda@intel.com>
Subject: [PATCH 07/11] tests/intel/xe_eudebug_online: add fd and flags to online_debug_data
Date: Fri, 28 Nov 2025 15:12:11 +0100 [thread overview]
Message-ID: <20251128-pagefault-one-of-many-v1-7-a8377a93da8f@intel.com> (raw)
In-Reply-To: <20251128-pagefault-one-of-many-v1-0-a8377a93da8f@intel.com>
Some helpers (get_shader, get_number_of_threads) will need more input
arguments, also some data can be cached instead of constant recalculation.
online_debug_data is a good candidate for both purposes. For starters
let's cache there most common inupt arguments.
This patch does not add functional changes.
Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
---
tests/intel/xe_eudebug_online.c | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c
index 3ed079b74216..e3aa13a39082 100644
--- a/tests/intel/xe_eudebug_online.c
+++ b/tests/intel/xe_eudebug_online.c
@@ -377,7 +377,9 @@ static inline uint64_t eu_ctl_interrupt_all(int debugfd, uint64_t client,
struct online_debug_data {
pthread_mutex_t mutex;
/* client in */
+ int drm_fd;
struct drm_xe_engine_class_instance hwe;
+ uint64_t flags;
/* client out */
int threads_count;
/* debugger internals */
@@ -402,7 +404,7 @@ struct online_debug_data {
};
static struct online_debug_data *
-online_debug_data_create(struct drm_xe_engine_class_instance *hwe)
+online_debug_data_create(int drm_fd, struct drm_xe_engine_class_instance *hwe, uint64_t flags)
{
struct online_debug_data *data;
@@ -410,7 +412,9 @@ online_debug_data_create(struct drm_xe_engine_class_instance *hwe)
PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
igt_assert(data);
+ data->drm_fd = drm_fd;
memcpy(&data->hwe, hwe, sizeof(*hwe));
+ data->flags = flags;
pthread_mutex_init(&data->mutex, NULL);
data->client_handle = -1ULL;
data->exec_queue_handle = -1ULL;
@@ -1439,7 +1443,7 @@ static void test_basic_online(int fd, struct drm_xe_engine_class_instance *hwe,
struct xe_eudebug_session *s;
struct online_debug_data *data;
- data = online_debug_data_create(hwe);
+ data = online_debug_data_create(fd, hwe, flags);
s = xe_eudebug_session_create(fd, run_online_client, flags, data);
xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_EU_ATTENTION,
@@ -1475,7 +1479,7 @@ static void test_set_breakpoint_online(int fd, struct drm_xe_engine_class_instan
igt_require(!(flags & FAULTABLE_VM) || !xe_supports_faults(fd));
- data = online_debug_data_create(hwe);
+ data = online_debug_data_create(fd, hwe, flags);
s = xe_eudebug_session_create(fd, run_online_client, flags, data);
xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_OPEN,
open_trigger);
@@ -1538,7 +1542,7 @@ static void test_set_breakpoint_online_sigint_debugger(int fd,
sleep_time = rand() % max_sleep_time;
igt_debug("Loop %d: SIGINT after %" PRIu64 " us\n", loop_count, sleep_time);
- data = online_debug_data_create(hwe);
+ data = online_debug_data_create(fd, hwe, flags);
s = xe_eudebug_session_create(fd, run_online_client, flags, data);
s->client->allow_dead_client = true;
xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_OPEN,
@@ -1632,7 +1636,7 @@ static void test_pagefault_online(int fd, struct drm_xe_engine_class_instance *h
struct xe_eudebug_session *s;
struct online_debug_data *data;
- data = online_debug_data_create(hwe);
+ data = online_debug_data_create(fd, hwe, flags);
s = xe_eudebug_session_create(fd, run_online_client, flags, data);
xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_OPEN,
@@ -1672,7 +1676,7 @@ static void test_preemption(int fd, struct drm_xe_engine_class_instance *hwe)
struct online_debug_data *data;
struct xe_eudebug_client *other;
- data = online_debug_data_create(hwe);
+ data = online_debug_data_create(fd, hwe, flags);
s = xe_eudebug_session_create(fd, run_online_client, flags, data);
other = xe_eudebug_client_create(fd, run_online_client, SHADER_NOP, data);
@@ -1717,7 +1721,7 @@ static void test_reset_with_attention_online(int fd, struct drm_xe_engine_class_
struct xe_eudebug_session *s1, *s2;
struct online_debug_data *data;
- data = online_debug_data_create(hwe);
+ data = online_debug_data_create(fd, hwe, flags);
s1 = xe_eudebug_session_create(fd, run_online_client, flags, data);
xe_eudebug_debugger_add_trigger(s1->debugger, DRM_XE_EUDEBUG_EVENT_EU_ATTENTION,
@@ -1771,7 +1775,7 @@ static void test_interrupt_all(int fd, struct drm_xe_engine_class_instance *hwe,
igt_require(!(flags & FAULTABLE_VM) || !xe_supports_faults(fd));
- data = online_debug_data_create(hwe);
+ data = online_debug_data_create(fd, hwe, flags);
s = xe_eudebug_session_create(fd, run_online_client, flags, data);
xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_OPEN,
@@ -1862,7 +1866,7 @@ static void test_interrupt_other(int fd, struct drm_xe_engine_class_instance *hw
int debugee_flags = SHADER_LOOP | DO_NOT_EXPECT_CANARIES;
int val;
- data = online_debug_data_create(hwe);
+ data = online_debug_data_create(fd, hwe, flags);
s = xe_eudebug_session_create(fd, run_online_client, flags, data);
xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_OPEN, open_trigger);
@@ -1892,7 +1896,7 @@ static void test_interrupt_other(int fd, struct drm_xe_engine_class_instance *hw
xe_eudebug_debugger_detach(s->debugger);
reset_debugger_log(s->debugger);
- debugee_data = online_debug_data_create(hwe);
+ debugee_data = online_debug_data_create(fd, hwe, flags);
s->debugger->ptr = debugee_data;
debugee = xe_eudebug_client_create(fd, run_online_client, debugee_flags, debugee_data);
igt_assert_eq(xe_eudebug_debugger_attach(s->debugger, debugee), 0);
@@ -1953,7 +1957,7 @@ static void test_tdctl_parameters(int fd, struct drm_xe_engine_class_instance *h
igt_assert(attention_bitmask);
- data = online_debug_data_create(hwe);
+ data = online_debug_data_create(fd, hwe, flags);
s = xe_eudebug_session_create(fd, run_online_client, flags, data);
xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_OPEN,
@@ -2103,7 +2107,7 @@ static void test_interrupt_reconnect(int fd, struct drm_xe_engine_class_instance
struct xe_eudebug_session *s;
uint32_t val;
- data = online_debug_data_create(hwe);
+ data = online_debug_data_create(fd, hwe, flags);
s = xe_eudebug_session_create(fd, run_online_client, flags, data);
xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_OPEN,
@@ -2182,7 +2186,7 @@ static void test_single_step(int fd, struct drm_xe_engine_class_instance *hwe, i
struct xe_eudebug_session *s;
struct online_debug_data *data;
- data = online_debug_data_create(hwe);
+ data = online_debug_data_create(fd, hwe, flags);
s = xe_eudebug_session_create(fd, run_online_client, flags, data);
xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_OPEN,
@@ -2232,7 +2236,7 @@ static void test_debugger_reopen(int fd, struct drm_xe_engine_class_instance *hw
struct xe_eudebug_session *s;
struct online_debug_data *data;
- data = online_debug_data_create(hwe);
+ data = online_debug_data_create(fd, hwe, flags);
s = xe_eudebug_session_create(fd, run_online_client, flags, data);
@@ -2283,7 +2287,7 @@ static void test_caching(int fd, struct drm_xe_engine_class_instance *hwe, int f
if (flags & SHADER_CACHING_VRAM || flags & BB_IN_VRAM || flags & TARGET_IN_VRAM)
igt_skip_on_f(!xe_has_vram(fd), "Device does not have VRAM.\n");
- data = online_debug_data_create(hwe);
+ data = online_debug_data_create(fd, hwe, flags);
s = xe_eudebug_session_create(fd, run_online_client, flags, data);
xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_OPEN,
@@ -2411,7 +2415,7 @@ static void test_many_sessions_on_tiles(int fd, bool multi_tile)
igt_require_f(n > 1, "Test requires at least two parallel compute engines!\n");
for (i = 0; i < n; i++) {
- data[i] = online_debug_data_create(hwe[i]);
+ data[i] = online_debug_data_create(fd, hwe[i], flags);
s[i] = xe_eudebug_session_create(fd, run_online_client, flags, data[i]);
xe_eudebug_debugger_add_trigger(s[i]->debugger, DRM_XE_EUDEBUG_EVENT_EU_ATTENTION,
--
2.43.0
next prev parent reply other threads:[~2025-11-28 14:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 14:12 [PATCH 00/11] tests/intel/xe_eudebug_online: add pagefault-one-of-many test Andrzej Hajda
2025-11-28 14:12 ` [PATCH 01/11] lib/igt_aux: add hweight helper for bitmaps Andrzej Hajda
2025-11-28 14:12 ` [PATCH 02/11] lib/xe/xe_query: add helpers to return count of EUs and EU threads Andrzej Hajda
2025-11-28 14:12 ` [PATCH 03/11] lib/gpgpu_shader: use recently introduced helper to get EU thread count Andrzej Hajda
2025-11-28 14:12 ` [PATCH 04/11] tests/intel/xe_eudebug_online: use igt_bitmap_hweight Andrzej Hajda
2025-11-28 14:12 ` [PATCH 05/11] lib/igt_aux: add fls helper for bitmaps Andrzej Hajda
2025-11-28 14:12 ` [PATCH 06/11] tests/intel/xe_eudebug_online: use igt_bitmap_fls to calculate max dss count Andrzej Hajda
2025-11-28 14:12 ` Andrzej Hajda [this message]
2025-11-28 14:12 ` [PATCH 08/11] tests/intel/xe_eudebug_online: rename threads_count to thread_hit_count Andrzej Hajda
2025-11-28 14:12 ` [PATCH 09/11] tests/intel/xe_eudebug_online: use online_debug_data in get_(shader|sip) Andrzej Hajda
2025-11-28 14:12 ` [PATCH 10/11] tests/intel/xe_eudebug_online: cache thread count value Andrzej Hajda
2025-11-28 14:12 ` [PATCH 11/11] tests/intel/xe_eudebug_online: add pagefault-one-of-many test Andrzej Hajda
2025-11-28 15:01 ` ✓ Xe.CI.BAT: success for " Patchwork
2025-11-28 15:39 ` ✓ i915.CI.BAT: " Patchwork
2025-11-28 15:58 ` ✗ Xe.CI.Full: failure " Patchwork
2025-12-01 13:24 ` â " Hajda, Andrzej
2025-11-28 16:24 ` ✗ i915.CI.Full: " Patchwork
2025-12-01 14:54 ` â " Hajda, Andrzej
2025-12-03 11:16 ` [PATCH 00/11] " Maciej Patelczyk
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=20251128-pagefault-one-of-many-v1-7-a8377a93da8f@intel.com \
--to=andrzej.hajda@intel.com \
--cc=gwan-gyeong.mun@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jan.maslak@intel.com \
--cc=kamil.konieczny@linux.intel.com \
--cc=priyanka.dandamudi@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).