From: "Dong, Zhanjun" <zhanjun.dong@intel.com>
To: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t v4 1/1] tests/intel/xe_exec_capture: Add xe_exec_capture test
Date: Fri, 15 Nov 2024 14:21:13 -0500 [thread overview]
Message-ID: <a80e0a1c-a36b-4fe3-862f-c2ba54418c5c@intel.com> (raw)
In-Reply-To: <533ff0ae-6eb3-402f-b6df-aeae10da75d4@intel.com>
On 2024-11-14 5:23 p.m., Dong, Zhanjun wrote:
> Please see my comments inline below.
>
> Regards,
> Zhanjun Dong
>
> On 2024-11-13 2:48 a.m., Teres Alexis, Alan Previn wrote:
>> On Tue, 2024-10-22 at 09:33 -0700, Zhanjun Dong wrote:
>>> Test with GuC reset, check if devcoredump register dump is within the
>> alan: nit: more clarification? -> "Submit cmds to the GPU that result
>> in a GuC engine reset and check that devcoredump
>> register dump is generated, by the GuC, and includes the full register
>> range"?
> sure
>>> range.
>>>
>>> Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
>>> ---
>>> tests/intel/xe_exec_capture.c | 365 ++++++++++++++++++++++++++++++++++
>>> tests/meson.build | 1 +
>>> 2 files changed, 366 insertions(+)
>>> create mode 100644 tests/intel/xe_exec_capture.c
>>>
>>> diff --git a/tests/intel/xe_exec_capture.c b/tests/intel/
>>> xe_exec_capture.c
>>> new file mode 100644
>>> index 000000000..3a8fa68f2
...
>>> +#define BASE_ADDRESS 0x1a0000
>>> +/* Batch buffer element count, in number of dwords(uint32_t) */
>>> +#define BATCH_DW_COUNT 16
>>> +
>>> +#define MAX_PATH_NAME_LEN 512
>>> +#define MAX_LINES 4096
>>> +/* Keep line content up to this length */
>>> +#define MAX_LINE_LEN 1024
>>> +#define MAIN_BUF_SIZE (MAX_LINES * MAX_LINE_LEN *
>>> sizeof(char))
>>> +/* Buffer size to read a line */
>>> +#define LINE_BUF_SIZE (64 * 1024)
>>> +
>> alan: the above set of definitions are being used for the sole purpose of
>> trying to get all of the devcoredump file into a buffer that you can
>> then go through
>> an find some specific keywords using strstr in get_coredump_item.
>> However, instead
>> of using all these definitions and creating alloc_lines_buffer,
>> load_all and get_coredump_item,
>> why not reuse igt_sysfs_get function? is there a reason we are not
>> using that?
> Yes, that idea comes from previous version review comments.
> By load all into line buffers, then lines buffer index is the
> line_number, make debug easier.
>>
>> Alternatively, i am wondering if we can consider the top part of the
>> devcoredump layout
>> is persistent and so maybe we dont even need to load so much of the
>> devcoredump?
>> i.e. if we dont get any variable length printouts or buffer object dumps
>> before the guc error capture then we could simply read the minimal
>> buffer size needed
>> to get the initial keywords of the guc error capture dump.
> That looks like what I do in V3: only data content between
> "**** Job ****"
> and
> "**** VM state ****"
> will be load into buffer and parsed
This rev loads all data into buffer, up to MAX_LINES of 4096, with full
16MB GuC log buffer+debug settings, the devcoredump could be very large
and 4096 lines can not hold all. On the other hand, the fixed max lines
is not scalable at all.
Back to the purpose of this igt test, it focus on engine register
capture, we don't care all other parts in the dump.
So in the next rev, I will only load contents of 2 sections:
**** Job ****
and
**** HW Engines ****
which is up to tag of
**** VM state ****
If we want to have line number, it could be line_number_of_start_tag +
index to get real line number, if we need it.
Regards,
Zhanjun Dong
>
>>
>>
>>> +#define DUMP_PATH "/sys/class/drm/card%d/
>>> device/devcoredump/data"
>>> +#define START_TAG "**** Job ****"
>>> +#define REGEX_KEY_VALUE_PAIR "^[ \t]*([^:]+):[ \t]*([^
>>> \t]+)[ \t]*$"
>>> +#define REGEX_KEY_INDEX 1
>>> +#define REGEX_VALUE_INDEX 2
>>> +#define REGEX_KEY_VALUE_GROUP_COUNT 3
>>> +
...
next prev parent reply other threads:[~2024-11-15 19:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 16:33 [PATCH i-g-t v4 0/1] tests/intel/xe_exec_capture: Add xe_exec_capture test Zhanjun Dong
2024-10-22 16:33 ` [PATCH i-g-t v4 1/1] " Zhanjun Dong
2024-11-13 7:48 ` Teres Alexis, Alan Previn
2024-11-13 23:23 ` Teres Alexis, Alan Previn
2024-11-14 22:23 ` Dong, Zhanjun
2024-11-15 19:21 ` Dong, Zhanjun [this message]
2024-11-14 22:33 ` Dong, Zhanjun
2024-11-13 23:26 ` Teres Alexis, Alan Previn
2024-10-22 18:47 ` ✗ GitLab.Pipeline: warning for tests/intel/xe_exec_capture: Add xe_exec_capture test (rev2) Patchwork
2024-10-22 19:14 ` ✓ Fi.CI.BAT: success " Patchwork
2024-10-22 20:19 ` ✓ CI.xeBAT: " Patchwork
2024-10-23 2:05 ` ✗ CI.xeFULL: failure " Patchwork
2024-10-23 3:35 ` ✗ Fi.CI.IGT: " Patchwork
2024-10-23 5:18 ` [PATCH i-g-t v4 0/1] tests/intel/xe_exec_capture: Add xe_exec_capture test Peter Senna Tschudin
2024-10-23 14:13 ` Dong, Zhanjun
2024-10-24 4:43 ` Peter Senna Tschudin
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=a80e0a1c-a36b-4fe3-862f-c2ba54418c5c@intel.com \
--to=zhanjun.dong@intel.com \
--cc=igt-dev@lists.freedesktop.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