From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t v2 03/10] tests/intel/xe_drm_fdinfo: Add helper to read utilization for all classes
Date: Thu, 11 Jul 2024 12:54:49 -0700 [thread overview]
Message-ID: <ZpA4ie/7N6GwM/BB@orsosgc001> (raw)
In-Reply-To: <lzcmgzn5o7gqpzalda6gs5kahgawiuofrimvqjdlfbi7j2syn4@mchmw5yfpqz4>
On Thu, Jul 11, 2024 at 08:40:46AM -0500, Lucas De Marchi wrote:
>On Tue, Jul 02, 2024 at 05:25:25PM GMT, Umesh Nerlige Ramappa wrote:
>>Add a helper that captures utilization for all classes.
>>
>>Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
>>---
>>tests/intel/xe_drm_fdinfo.c | 20 ++++++++++++++++++++
>>1 file changed, 20 insertions(+)
>>
>>diff --git a/tests/intel/xe_drm_fdinfo.c b/tests/intel/xe_drm_fdinfo.c
>>index b64bef339..c697f3e53 100644
>>--- a/tests/intel/xe_drm_fdinfo.c
>>+++ b/tests/intel/xe_drm_fdinfo.c
>>@@ -42,6 +42,11 @@ IGT_TEST_DESCRIPTION("Read and verify drm client memory consumption and engine u
>>
>>#define BO_SIZE (65536)
>>
>>+struct pceu_cycles {
>>+ uint64_t cycles;
>>+ uint64_t total_cycles;
>>+};
>>+
>>static const char *engine_map[] = {
>> "rcs",
>> "bcs",
>>@@ -49,6 +54,21 @@ static const char *engine_map[] = {
>> "vecs",
>> "ccs",
>>};
>
>nit: missing newline here, otherwise:
will add
>
>>+static void read_engine_cycles(int xe, struct pceu_cycles *pceu)
>
>I think that would be better to give the compiler a hint about the
>size of the array:
>
>static void read_engine_cycles(int xe,
> struct pceu_cycles pceu[static DRM_XE_ENGINE_CLASS_COMPUTE + 1])
Never knew static could be placed there. Will add.
>
>(it would not be a bad idea to have a local __IGT_DRM_XE_ENGINE_CLASS_LAST
>too, but outside of the scope here)
>
>Otherwise,
>
>// Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Thanks,
Umesh
>
>Lucas De Marchi
>
>>+{
>>+ struct drm_client_fdinfo info = { };
>>+ int class;
>>+
>>+ igt_assert(pceu);
>>+ igt_assert(igt_parse_drm_fdinfo(xe, &info, engine_map,
>>+ ARRAY_SIZE(engine_map), NULL, 0));
>>+
>>+ xe_for_each_engine_class(class) {
>>+ pceu[class].cycles = info.cycles[class];
>>+ pceu[class].total_cycles = info.total_cycles[class];
>>+ }
>>+}
>>+
>>/* Subtests */
>>static void test_active(int fd, struct drm_xe_engine *engine)
>>{
>>--
>>2.38.1
>>
next prev parent reply other threads:[~2024-07-11 19:54 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 0:25 [PATCH i-g-t v2 00/10] Add per-client engine utilization tests Umesh Nerlige Ramappa
2024-07-03 0:25 ` [PATCH i-g-t v2 01/10] tests/intel/xe_drm_fdinfo: Rename basic to basic-memory test Umesh Nerlige Ramappa
2024-07-11 12:00 ` Lucas De Marchi
2024-07-11 17:39 ` Umesh Nerlige Ramappa
2024-07-11 20:36 ` Lucas De Marchi
2024-07-30 12:41 ` Kamil Konieczny
2024-07-03 0:25 ` [PATCH i-g-t v2 02/10] tests/intel/xe_drm_fdinfo: Add basic-engine-utilization test Umesh Nerlige Ramappa
2024-07-11 12:03 ` Lucas De Marchi
2024-07-31 3:40 ` Lucas De Marchi
2024-07-03 0:25 ` [PATCH i-g-t v2 03/10] tests/intel/xe_drm_fdinfo: Add helper to read utilization for all classes Umesh Nerlige Ramappa
2024-07-11 13:40 ` Lucas De Marchi
2024-07-11 19:54 ` Umesh Nerlige Ramappa [this message]
2024-07-30 0:23 ` Lucas De Marchi
2024-07-03 0:25 ` [PATCH i-g-t v2 04/10] tests/intel/xe_drm_fdinfo: Add helpers for spinning batches Umesh Nerlige Ramappa
2024-07-11 12:46 ` Lucas De Marchi
2024-07-11 18:29 ` Umesh Nerlige Ramappa
2024-07-12 0:04 ` Matthew Brost
2024-08-15 16:46 ` Lucas De Marchi
2024-07-03 0:25 ` [PATCH i-g-t v2 05/10] tests/intel/xe_drm_fdinfo: Add single engine tests Umesh Nerlige Ramappa
2024-07-11 13:20 ` Lucas De Marchi
2024-07-11 19:13 ` Umesh Nerlige Ramappa
2024-07-11 21:34 ` Lucas De Marchi
2024-07-11 22:45 ` Umesh Nerlige Ramappa
2024-07-03 0:25 ` [PATCH i-g-t v2 06/10] tests/intel/xe_drm_fdinfo: Add tests to verify all class utilization Umesh Nerlige Ramappa
2024-07-03 0:25 ` [PATCH i-g-t v2 07/10] tests/intel/xe_drm_fdinfo: Add an iterator for virtual engines Umesh Nerlige Ramappa
2024-07-11 13:34 ` Lucas De Marchi
2024-07-11 18:31 ` Umesh Nerlige Ramappa
2024-07-11 22:30 ` Lucas De Marchi
2024-07-12 0:17 ` Matthew Brost
2024-07-03 0:25 ` [PATCH i-g-t v2 08/10] tests/intel/xe_drm_fdinfo: Add tests " Umesh Nerlige Ramappa
2024-07-03 0:25 ` [PATCH i-g-t v2 09/10] tests/intel/xe_drm_fdinfo: Add tests for parallel engines Umesh Nerlige Ramappa
2024-07-03 0:25 ` [PATCH i-g-t v2 10/10] tests/intel/xe_drm_fdinfo: Ensure queue destroy records load correctly Umesh Nerlige Ramappa
2024-07-03 14:41 ` ✗ Fi.CI.BUILD: failure for Add per-client engine utilization tests (rev3) Patchwork
2024-07-04 17:14 ` ✓ CI.xeBAT: success for Add per-client engine utilization tests (rev4) Patchwork
2024-07-04 17:24 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-07-04 22:18 ` ✓ CI.xeFULL: success " Patchwork
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=ZpA4ie/7N6GwM/BB@orsosgc001 \
--to=umesh.nerlige.ramappa@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=lucas.demarchi@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