From: Petri Latvala <petri.latvala@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org,
Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 1/1] intel-gpu-top: Support for client stats
Date: Mon, 7 Sep 2020 12:31:17 +0300 [thread overview]
Message-ID: <20200907093117.GX7444@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20200904130607.133724-2-tvrtko.ursulin@linux.intel.com>
On Fri, Sep 04, 2020 at 02:06:07PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Adds support for per-client engine busyness stats i915 exports in sysfs
> and produces output like the below:
>
> ==========================================================================
> intel-gpu-top - 935/ 935 MHz; 0% RC6; 14.73 Watts; 1097 irqs/s
>
> IMC reads: 1401 MiB/s
> IMC writes: 4 MiB/s
>
> ENGINE BUSY MI_SEMA MI_WAIT
> Render/3D/0 63.73% |███████████████████ | 3% 0%
> Blitter/0 9.53% |██▊ | 6% 0%
> Video/0 39.32% |███████████▊ | 16% 0%
> Video/1 15.62% |████▋ | 0% 0%
> VideoEnhance/0 0.00% | | 0% 0%
>
> PID NAME RCS BCS VCS VECS
> 4084 gem_wsim |█████▌ ||█ || || |
> 4086 gem_wsim |█▌ || ||███ || |
> ==========================================================================
>
> Apart from the existing physical engine utilization it now also shows
> utilization per client and per engine class.
>
> v2:
> * Version to match removal of global enable_stats toggle.
> * Plus various fixes.
>
> v3:
> * Support brief backward jumps in client stats.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
> tools/intel_gpu_top.c | 539 +++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 528 insertions(+), 11 deletions(-)
>
> diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
> index cae01c25b920..9eac569e75de 100644
> --- a/tools/intel_gpu_top.c
> +++ b/tools/intel_gpu_top.c
> @@ -679,23 +679,347 @@ static void pmu_sample(struct engines *engines)
> }
> }
>
> +enum client_status {
> + FREE = 0, /* mbz */
> + ALIVE,
> + PROBE
> +};
> +
> +struct clients;
> +
> +struct client {
> + struct clients *clients;
> +
> + enum client_status status;
> + unsigned int id;
> + unsigned int pid;
> + char name[128];
> + unsigned int samples;
> + unsigned long total;
> + struct engines *engines;
> + unsigned long *val;
> + uint64_t *last;
> +};
> +
> +struct engine_class {
> + unsigned int class;
> + const char *name;
> + unsigned int num_engines;
> +};
> +
> +struct clients {
> + unsigned int num_classes;
> + struct engine_class *class;
> +
> + unsigned int num_clients;
> + struct client *client;
> +};
> +
> +#define for_each_client(clients, c, tmp) \
> + for ((tmp) = (clients)->num_clients, c = (clients)->client; \
> + (tmp > 0); (tmp)--, (c)++)
> +
> +static struct clients *init_clients(void)
> +{
> + struct clients *clients = malloc(sizeof(*clients));
> +
> + return memset(clients, 0, sizeof(*clients));
> +}
> +
> +#define SYSFS_CLIENTS "/sys/class/drm/card0/clients"
Now that intel_gpu_top supports device selection, this path works
every time only 60% of the time, right?
--
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-09-07 9:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-04 13:06 [Intel-gfx] [PATCH i-g-t 0/1] Per client engine busyness for intel_gpu_top Tvrtko Ursulin
2020-09-04 13:06 ` [igt-dev] [PATCH i-g-t 1/1] intel-gpu-top: Support for client stats Tvrtko Ursulin
2020-09-07 9:31 ` Petri Latvala [this message]
2020-09-07 9:53 ` [Intel-gfx] " Tvrtko Ursulin
2020-09-14 15:39 ` [igt-dev] [PATCH i-g-t v4] " Tvrtko Ursulin
2020-09-04 13:40 ` [igt-dev] ✓ Fi.CI.BAT: success for Per client engine busyness for intel_gpu_top Patchwork
2020-09-04 22:51 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-09-14 17:40 ` [igt-dev] ✓ Fi.CI.BAT: success for Per client engine busyness for intel_gpu_top (rev2) Patchwork
2020-09-15 0:32 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2019-12-16 12:09 [igt-dev] [PATCH i-g-t 0/1] intel_gpu_top per client engine busyness Tvrtko Ursulin
2019-12-16 12:09 ` [igt-dev] [PATCH i-g-t 1/1] intel-gpu-top: Support for client stats Tvrtko Ursulin
2019-12-16 13:26 ` Chris Wilson
2019-12-16 14:11 ` Tvrtko Ursulin
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=20200907093117.GX7444@platvala-desk.ger.corp.intel.com \
--to=petri.latvala@intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=igt-dev@lists.freedesktop.org \
--cc=tvrtko.ursulin@intel.com \
--cc=tvrtko.ursulin@linux.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