* [igt-dev] [PATCH i-g-t 0/1] intel_gpu_top per client engine busyness
@ 2019-12-16 12:09 Tvrtko Ursulin
2019-12-16 12:09 ` [igt-dev] [PATCH i-g-t 1/1] intel-gpu-top: Support for client stats Tvrtko Ursulin
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Tvrtko Ursulin @ 2019-12-16 12:09 UTC (permalink / raw)
To: igt-dev; +Cc: Brian Welty, Tvrtko Ursulin
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
intel_gpu_top counterpart for the equally named i915 series. For reference only
at this stage.
Tvrtko Ursulin (1):
intel-gpu-top: Support for client stats
tools/intel_gpu_top.c | 590 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 584 insertions(+), 6 deletions(-)
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] [PATCH i-g-t 1/1] intel-gpu-top: Support for client stats
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 ` Tvrtko Ursulin
2019-12-16 13:26 ` Chris Wilson
2019-12-16 18:23 ` [igt-dev] [PATCH] " Tvrtko Ursulin
2019-12-16 14:52 ` [igt-dev] ✓ Fi.CI.BAT: success for intel_gpu_top per client engine busyness Patchwork
` (3 subsequent siblings)
4 siblings, 2 replies; 11+ messages in thread
From: Tvrtko Ursulin @ 2019-12-16 12:09 UTC (permalink / raw)
To: igt-dev; +Cc: Brian Welty, Tvrtko Ursulin
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.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
tools/intel_gpu_top.c | 590 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 584 insertions(+), 6 deletions(-)
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index cc8db7c539ed..a125296b3cef 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -659,8 +659,403 @@ 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)++)
+
+#define SYSFS_ENABLE "/sys/class/drm/card0/clients/enable_stats"
+
+bool __stats_enabled;
+
+static int __set_stats(bool val)
+{
+ int fd, ret;
+
+ fd = open(SYSFS_ENABLE, O_WRONLY);
+ if (fd < 0)
+ return -errno;
+
+ ret = write(fd, val ? "1" : "0", 2);
+ if (ret < 0)
+ return -errno;
+ else if (ret < 2)
+ return 1;
+
+ close(fd);
+
+ return 0;
+}
+
+static void __restore_stats(void)
+{
+ int ret;
+
+ if (__stats_enabled)
+ return;
+
+ ret = __set_stats(false);
+ if (ret)
+ fprintf(stderr, "Failed to disable per-client stats! (%d)\n",
+ ret);
+}
+
+static void __restore_stats_signal(int sig)
+{
+ exit(0);
+}
+
+static int enable_stats(void)
+{
+ int fd, ret;
+
+ fd = open(SYSFS_ENABLE, O_RDONLY);
+ if (fd < 0)
+ return -errno;
+
+ close(fd);
+
+ __stats_enabled = filename_to_u64(SYSFS_ENABLE, 10);
+ if (__stats_enabled)
+ return 0;
+
+ ret = __set_stats(true);
+ if (!ret) {
+ if (atexit(__restore_stats))
+ fprintf(stderr, "Failed to register exit handler!");
+
+ if (signal(SIGINT, __restore_stats_signal))
+ fprintf(stderr, "Failed to register signal handler!");
+ } else {
+ fprintf(stderr, "Failed to enable per-client stats! (%d)\n",
+ ret);
+ }
+
+ return ret;
+}
+
+static struct clients *init_clients(void)
+{
+ struct clients *clients = malloc(sizeof(*clients));
+
+ if (enable_stats()) {
+ free(clients);
+ return NULL;
+ }
+
+ return memset(clients, 0, sizeof(*clients));
+}
+
+#define SYSFS_CLIENTS "/sys/class/drm/card0/clients"
+
+static uint64_t read_client_busy(unsigned int id, unsigned int class)
+{
+ char buf[256];
+ ssize_t ret;
+
+ ret = snprintf(buf, sizeof(buf),
+ SYSFS_CLIENTS "/%u/busy/%u",
+ id, class);
+ assert(ret > 0 && ret < sizeof(buf));
+ if (ret <= 0 || ret == sizeof(buf))
+ return 0;
+
+ return filename_to_u64(buf, 10);
+}
+
+static struct client *
+find_client(struct clients *clients, enum client_status status, unsigned int id)
+{
+ struct client *c;
+ int tmp;
+
+ for_each_client(clients, c, tmp) {
+ if ((status == FREE && c->status == FREE) ||
+ (status == c->status && c->id == id))
+ return c;
+ }
+
+ return NULL;
+}
+
+static void update_client(struct client *c, unsigned int pid, char *name)
+{
+ uint64_t val[c->clients->num_classes];
+ unsigned int i;
+
+ if (c->pid != pid)
+ c->pid = pid;
+
+ if (strncmp(c->name, name, sizeof(c->name)))
+ strncpy(c->name, name, sizeof(c->name));
+
+ for (i = 0; i < c->clients->num_classes; i++)
+ val[i] = read_client_busy(c->id, c->clients->class[i].class);
+
+ c->total = 0;
+
+ for (i = 0; i < c->clients->num_classes; i++) {
+ assert(val[i] >= c->last[i]);
+ c->val[i] = val[i] - c->last[i];
+ c->total += c->val[i];
+ c->last[i] = val[i];
+ }
+
+ c->samples++;
+ c->status = ALIVE;
+}
+
+static int class_cmp(const void *_a, const void *_b)
+{
+ const struct engine_class *a = _a;
+ const struct engine_class *b = _b;
+
+ return a->class - b->class;
+}
+
+static void scan_classes(struct clients *clients, unsigned int id)
+{
+ struct engine_class *classes;
+ unsigned int num, i;
+ struct dirent *dent;
+ char buf[256];
+ int ret;
+ DIR *d;
+
+ ret = snprintf(buf, sizeof(buf), SYSFS_CLIENTS "/%u/busy", id);
+ assert(ret > 0 && ret < sizeof(buf));
+ if (ret <= 0 || ret == sizeof(buf))
+ return;
+
+ d = opendir(buf);
+ if (!d)
+ return;
+
+restart:
+ rewinddir(d);
+
+ num = 0;
+ while ((dent = readdir(d)) != NULL) {
+ if (dent->d_type != DT_REG)
+ continue;
+
+ num++;
+ }
+
+ rewinddir(d);
+
+ classes = calloc(num, sizeof(*classes));
+ assert(classes);
+
+ i = 0;
+ while ((dent = readdir(d)) != NULL) {
+ if (i > num) {
+ // FIXME: free individual names
+ free(classes);
+ goto restart;
+ }
+
+ if (dent->d_type != DT_REG)
+ continue;
+
+ classes[i].class = atoi(dent->d_name);
+ classes[i].name = class_display_name(classes[i].class);
+ i++;
+ }
+
+ closedir(d);
+
+ qsort(classes, num, sizeof(*classes), class_cmp);
+
+ clients->num_classes = num;
+ clients->class = classes;
+}
+
+static void
+add_client(struct clients *clients, unsigned int id, unsigned int pid,
+ char *name)
+{
+ struct client *c;
+
+ assert(!find_client(clients, ALIVE, id));
+
+ c = find_client(clients, FREE, 0);
+ if (!c) {
+ unsigned int idx = clients->num_clients;
+
+ clients->num_clients += (clients->num_clients + 2) / 2;
+ clients->client = realloc(clients->client,
+ clients->num_clients * sizeof(*c));
+ assert(clients->client);
+
+ c = &clients->client[idx];
+ memset(c, 0, (clients->num_clients - idx) * sizeof(*c));
+ }
+
+ if (!clients->num_classes)
+ scan_classes(clients, id);
+
+ c->id = id;
+ c->clients = clients;
+ c->val = calloc(clients->num_classes, sizeof(c->val));
+ c->last = calloc(clients->num_classes, sizeof(c->last));
+ assert(c->val && c->last);
+
+ update_client(c, pid, name);
+}
+
+static void free_client(struct client *c)
+{
+ free(c->val);
+ free(c->last);
+ memset(c, 0, sizeof(*c));
+}
+
+static char *read_client_sysfs(unsigned int id, const char *field)
+{
+ char buf[256];
+ ssize_t ret;
+
+ ret = snprintf(buf, sizeof(buf), SYSFS_CLIENTS "/%u/%s", id, field);
+ assert(ret > 0 && ret < sizeof(buf));
+ if (ret <= 0 || ret == sizeof(buf))
+ return NULL;
+
+ ret = filename_to_buf(buf, buf, sizeof(buf));
+ assert(ret == 0);
+ if (ret)
+ return NULL;
+
+ return strdup(buf);
+}
+
+static void scan_clients(struct clients *clients)
+{
+ struct dirent *dent;
+ struct client *c;
+ char *pid, *name;
+ unsigned int id;
+ int tmp;
+ DIR *d;
+
+ if (!clients)
+ return;
+
+ for_each_client(clients, c, tmp) {
+ if (c->status == ALIVE)
+ c->status = PROBE;
+ }
+
+ d = opendir(SYSFS_CLIENTS);
+ if (!d)
+ return;
+
+ while ((dent = readdir(d)) != NULL) {
+ if (dent->d_type != DT_DIR)
+ continue;
+ if (!isdigit(dent->d_name[0]))
+ continue;
+
+ id = atoi(dent->d_name);
+
+ name = read_client_sysfs(id, "name");
+ assert(name);
+ if (!name)
+ continue;
+
+ pid = read_client_sysfs(id, "pid");
+ assert(pid);
+ if (!pid) {
+ free(name);
+ continue;
+ }
+
+ c = find_client(clients, PROBE, id);
+ if (c) {
+ update_client(c, atoi(pid), name);
+ continue;
+ }
+
+ add_client(clients, id, atoi(pid), name);
+
+ free(name);
+ free(pid);
+ }
+
+ closedir(d);
+
+ for_each_client(clients, c, tmp) {
+ if (c->status == PROBE)
+ free_client(c);
+ }
+}
+
+static int cmp(const void *_a, const void *_b)
+{
+ const struct client *a = _a;
+ const struct client *b = _b;
+ long tot_a = a->total;
+ long tot_b = b->total;
+
+ tot_a *= a->status == ALIVE && a->samples > 1;
+ tot_b *= b->status == ALIVE && b->samples > 1;
+
+ tot_b -= tot_a;
+
+ if (!tot_b)
+ return (int)b->id - a->id;
+
+ while (tot_b > INT_MAX || tot_b < INT_MIN)
+ tot_b /= 2;
+
+ return tot_b;
+}
+
static const char *bars[] = { " ", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█" };
+static void n_spaces(const unsigned int n)
+{
+ unsigned int i;
+
+ for (i = 0; i < n; i++)
+ putchar(' ');
+}
+
static void
print_percentage_bar(double percent, int max_len)
{
@@ -674,8 +1069,10 @@ print_percentage_bar(double percent, int max_len)
if (i)
printf("%s", bars[i]);
- for (i = 0; i < (max_len - 2 - (bar_len + 7) / 8); i++)
- putchar(' ');
+ bar_len = max_len - 2 - (bar_len + 7) / 8;
+ if (bar_len > max_len)
+ bar_len = max_len;
+ n_spaces(bar_len);
putchar('|');
}
@@ -775,6 +1172,18 @@ json_close_struct(void)
fflush(stdout);
}
+static void
+__json_add_member(const char *key, const char *val)
+{
+ assert(json_indent_level < ARRAY_SIZE(json_indent));
+
+ fprintf(out, "%s%s\"%s\": \"%s\"",
+ json_struct_members ? ",\n" : "",
+ json_indent[json_indent_level], key, val);
+
+ json_struct_members++;
+}
+
static unsigned int
json_add_member(const struct cnt_group *parent, struct cnt_item *item,
unsigned int headers)
@@ -1075,8 +1484,6 @@ print_header(struct engines *engines, double t,
memmove(&groups[0], &groups[1],
sizeof(groups) - sizeof(groups[0]));
- pops->open_struct(NULL);
-
*consumed = print_groups(groups);
if (output_mode == INTERACTIVE) {
@@ -1232,7 +1639,6 @@ print_engines_footer(struct engines *engines, double t,
int lines, int con_w, int con_h)
{
pops->close_struct();
- pops->close_struct();
if (output_mode == INTERACTIVE) {
if (lines++ < con_h)
@@ -1242,6 +1648,136 @@ print_engines_footer(struct engines *engines, double t,
return lines;
}
+static int
+print_clients_header(struct clients *clients, int lines,
+ int con_w, int con_h, unsigned int *class_w)
+{
+ int len;
+
+ if (output_mode == INTERACTIVE) {
+ if (lines++ >= con_h)
+ return lines;
+
+ printf("\033[7m");
+ len = printf("%5s%16s", "PID", "NAME");
+
+ if (lines++ >= con_h)
+ return lines;
+
+ if (clients->num_classes) {
+ unsigned int i;
+
+ *class_w = (con_w - len) / clients->num_classes;
+
+ for (i = 0; i < clients->num_classes; i++) {
+ const char *name = clients->class[i].name;
+ unsigned int name_len = strlen(name);
+ unsigned int pad = (*class_w - name_len) / 2;
+ unsigned int spaces = *class_w - pad - name_len;
+
+ n_spaces(pad);
+ printf("%s", name);
+ n_spaces(spaces);
+ len += pad + name_len + spaces;
+ }
+ }
+
+ n_spaces(con_w - len);
+ printf("\033[0m\n");
+ } else {
+ if (clients->num_classes)
+ pops->open_struct("clients");
+ }
+
+ return lines;
+}
+
+static void count_engines(struct clients *clients, struct engines *engines)
+{
+ unsigned int i;
+
+ for (i = 0; i < engines->num_engines; i++) {
+ struct engine *engine = engine_ptr(engines, i);
+
+ clients->class[engine->class].num_engines++;
+ }
+}
+
+static int
+print_client(struct client *c, struct engines *engines, double t, int lines,
+ int con_w, int con_h, unsigned int period_us,
+ unsigned int *class_w)
+{
+ struct clients *clients = c->clients;
+ unsigned int i;
+
+ if (output_mode == INTERACTIVE) {
+ printf("%5u%16s ", c->pid, c->name);
+
+ for (i = 0; i < clients->num_classes; i++) {
+ double pct;
+
+ if (!clients->class[i].num_engines)
+ count_engines(clients, engines);
+
+ pct = (double)c->val[i] / period_us / 1e3 * 100 /
+ clients->class[i].num_engines;
+
+ print_percentage_bar(pct, *class_w);
+ }
+
+ putchar('\n');
+ } else if (output_mode == JSON) {
+ char buf[64];
+
+ snprintf(buf, sizeof(buf), "%u", c->id);
+ pops->open_struct(buf);
+
+ __json_add_member("name", c->name);
+
+ snprintf(buf, sizeof(buf), "%u", c->pid);
+ __json_add_member("pid", buf);
+
+ pops->open_struct("engine-classes");
+
+ for (i = 0; i < clients->num_classes; i++) {
+ double pct;
+
+ snprintf(buf, sizeof(buf), "%s",
+ clients->class[i].name);
+ pops->open_struct(buf);
+
+ pct = (double)c->val[i] / period_us / 1e3 * 100;
+ snprintf(buf, sizeof(buf), "%f", pct);
+ __json_add_member("busy", buf);
+
+ __json_add_member("unit", "%");
+
+ pops->close_struct();
+ }
+
+ pops->close_struct();
+ pops->close_struct();
+ }
+
+ return lines;
+}
+
+static int
+print_clients_footer(struct clients *clients, double t,
+ int lines, int con_w, int con_h)
+{
+ if (output_mode == INTERACTIVE) {
+ if (lines++ < con_h)
+ printf("\n");
+ } else {
+ if (clients->num_classes)
+ pops->close_struct();
+ }
+
+ return lines;
+}
+
static bool stop_top;
static void sigint_handler(int sig)
@@ -1252,6 +1788,7 @@ static void sigint_handler(int sig)
int main(int argc, char **argv)
{
unsigned int period_us = DEFAULT_PERIOD_MS * 1000;
+ struct clients *clients = NULL;
int con_w = -1, con_h = -1;
char *output_path = NULL;
struct engines *engines;
@@ -1335,12 +1872,17 @@ int main(int argc, char **argv)
return 1;
}
+ clients = init_clients();
+
pmu_sample(engines);
+ scan_clients(clients);
while (!stop_top) {
bool consumed = false;
- int lines = 0;
+ int j, lines = 0;
+ unsigned int class_w;
struct winsize ws;
+ struct client *c;
double t;
/* Update terminal size. */
@@ -1354,10 +1896,18 @@ int main(int argc, char **argv)
pmu_sample(engines);
t = (double)(engines->ts.cur - engines->ts.prev) / 1e9;
+ scan_clients(clients);
+ if (clients) {
+ qsort(clients->client, clients->num_clients,
+ sizeof(*clients->client), cmp);
+ }
+
if (stop_top)
break;
while (!consumed) {
+ pops->open_struct(NULL);
+
lines = print_header(engines, t, lines, con_w, con_h,
&consumed);
@@ -1376,6 +1926,34 @@ int main(int argc, char **argv)
lines = print_engines_footer(engines, t, lines, con_w,
con_h);
+
+ if (clients) {
+ lines = print_clients_header(clients, lines,
+ con_w, con_h,
+ &class_w);
+
+ for_each_client(clients, c, j) {
+ if (lines++ > con_h)
+ break;
+
+ assert(c->status != PROBE);
+ if (c->status != ALIVE)
+ break;
+
+ if (c->samples < 2)
+ continue;
+
+ lines = print_client(c, engines, t,
+ lines, con_w,
+ con_h, period_us,
+ &class_w);
+ }
+
+ lines = print_clients_footer(clients, t, lines,
+ con_w, con_h);
+ }
+
+ pops->close_struct();
}
if (stop_top)
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/1] intel-gpu-top: Support for client stats
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
2019-12-16 18:23 ` [igt-dev] [PATCH] " Tvrtko Ursulin
1 sibling, 1 reply; 11+ messages in thread
From: Chris Wilson @ 2019-12-16 13:26 UTC (permalink / raw)
To: Tvrtko Ursulin, igt-dev; +Cc: Brian Welty, Tvrtko Ursulin
Quoting Tvrtko Ursulin (2019-12-16 12:09:23)
> +static void __restore_stats(void)
> +{
> + int ret;
> +
> + if (__stats_enabled)
> + return;
> +
> + ret = __set_stats(false);
Therein lies the problem with a global toggle. :(
Hmm, if our stats toggling is always in process_csb() responding to
events, they shouldn't affect execution latency... I think you have made
them cheap enough to consider always enabling. Let's see.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/1] intel-gpu-top: Support for client stats
2019-12-16 13:26 ` Chris Wilson
@ 2019-12-16 14:11 ` Tvrtko Ursulin
0 siblings, 0 replies; 11+ messages in thread
From: Tvrtko Ursulin @ 2019-12-16 14:11 UTC (permalink / raw)
To: Chris Wilson, igt-dev; +Cc: Brian Welty, Tvrtko Ursulin
On 16/12/2019 13:26, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2019-12-16 12:09:23)
>> +static void __restore_stats(void)
>> +{
>> + int ret;
>> +
>> + if (__stats_enabled)
>> + return;
>> +
>> + ret = __set_stats(false);
>
> Therein lies the problem with a global toggle. :(
Inverted check bug, okay. :) But yes, global toggle is a bit of a silly
thing.
> Hmm, if our stats toggling is always in process_csb() responding to
> events, they shouldn't affect execution latency... I think you have made
> them cheap enough to consider always enabling. Let's see.
I think they will be. Didn't spot anything in casual testing but can do
more pathological cases if you want.
Regards,
Tvrtko
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for intel_gpu_top per client engine busyness
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 14:52 ` Patchwork
2019-12-16 16:44 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2019-12-16 14:52 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: igt-dev
== Series Details ==
Series: intel_gpu_top per client engine busyness
URL : https://patchwork.freedesktop.org/series/70980/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7573 -> IGTPW_3865
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_3865:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* igt@gem_ctx_switch@rcs0:
- {fi-tgl-guc}: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/fi-tgl-guc/igt@gem_ctx_switch@rcs0.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/fi-tgl-guc/igt@gem_ctx_switch@rcs0.html
Known issues
------------
Here are the changes found in IGTPW_3865 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_close_race@basic-threads:
- fi-byt-j1900: [PASS][3] -> [TIMEOUT][4] ([i915#816])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/fi-byt-j1900/igt@gem_close_race@basic-threads.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/fi-byt-j1900/igt@gem_close_race@basic-threads.html
* igt@i915_selftest@live_gem_contexts:
- fi-hsw-peppy: [PASS][5] -> [INCOMPLETE][6] ([i915#694])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
- fi-byt-n2820: [PASS][7] -> [DMESG-FAIL][8] ([i915#722])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
#### Possible fixes ####
* igt@i915_selftest@live_blt:
- fi-ivb-3770: [DMESG-FAIL][9] ([i915#725]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/fi-ivb-3770/igt@i915_selftest@live_blt.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/fi-ivb-3770/igt@i915_selftest@live_blt.html
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-icl-y: [INCOMPLETE][11] ([i915#140]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/fi-icl-y/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/fi-icl-y/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
#### Warnings ####
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-kbl-x1275: [DMESG-WARN][13] ([i915#62] / [i915#92]) -> [DMESG-WARN][14] ([i915#62] / [i915#92] / [i915#95]) +2 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/fi-kbl-x1275/igt@i915_pm_rpm@basic-pci-d3-state.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/fi-kbl-x1275/igt@i915_pm_rpm@basic-pci-d3-state.html
* igt@i915_selftest@live_blt:
- fi-hsw-4770: [DMESG-FAIL][15] ([i915#725]) -> [DMESG-FAIL][16] ([i915#563])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/fi-hsw-4770/igt@i915_selftest@live_blt.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/fi-hsw-4770/igt@i915_selftest@live_blt.html
- fi-hsw-4770r: [DMESG-FAIL][17] ([i915#553] / [i915#725]) -> [DMESG-FAIL][18] ([i915#725])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/fi-hsw-4770r/igt@i915_selftest@live_blt.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/fi-hsw-4770r/igt@i915_selftest@live_blt.html
* igt@kms_pipe_crc_basic@read-crc-pipe-b:
- fi-kbl-x1275: [DMESG-WARN][19] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][20] ([i915#62] / [i915#92]) +3 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/fi-kbl-x1275/igt@kms_pipe_crc_basic@read-crc-pipe-b.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/fi-kbl-x1275/igt@kms_pipe_crc_basic@read-crc-pipe-b.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#140]: https://gitlab.freedesktop.org/drm/intel/issues/140
[i915#553]: https://gitlab.freedesktop.org/drm/intel/issues/553
[i915#563]: https://gitlab.freedesktop.org/drm/intel/issues/563
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#722]: https://gitlab.freedesktop.org/drm/intel/issues/722
[i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
[i915#816]: https://gitlab.freedesktop.org/drm/intel/issues/816
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
[k.org#204565]: https://bugzilla.kernel.org/show_bug.cgi?id=204565
Participating hosts (53 -> 48)
------------------------------
Additional (2): fi-tgl-y fi-kbl-guc
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5349 -> IGTPW_3865
CI-20190529: 20190529
CI_DRM_7573: 5f2c1ea1bfb34f9777b829eec98a974edd82b885 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3865: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/index.html
IGT_5349: 048f58513d8b8ec6bb307a939f0ac959bc0f0e10 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] ✗ Fi.CI.IGT: failure for intel_gpu_top per client engine busyness
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 14:52 ` [igt-dev] ✓ Fi.CI.BAT: success for intel_gpu_top per client engine busyness Patchwork
@ 2019-12-16 16:44 ` Patchwork
2019-12-16 18:53 ` [igt-dev] ✓ Fi.CI.BAT: success for intel_gpu_top per client engine busyness (rev2) Patchwork
2019-12-17 0:24 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
4 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2019-12-16 16:44 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: igt-dev
== Series Details ==
Series: intel_gpu_top per client engine busyness
URL : https://patchwork.freedesktop.org/series/70980/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_7573_full -> IGTPW_3865_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_3865_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_3865_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_3865_full:
### IGT changes ###
#### Possible regressions ####
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-plflip-blt:
- shard-tglb: NOTRUN -> [DMESG-WARN][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-tglb1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-plflip-blt.html
Known issues
------------
Here are the changes found in IGTPW_3865_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@vcs1-none:
- shard-iclb: [PASS][2] -> [SKIP][3] ([fdo#109276] / [fdo#112080])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-iclb2/igt@gem_ctx_isolation@vcs1-none.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-iclb8/igt@gem_ctx_isolation@vcs1-none.html
* igt@gem_eio@in-flight-suspend:
- shard-tglb: [PASS][4] -> [INCOMPLETE][5] ([i915#456] / [i915#460] / [i915#534])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-tglb1/igt@gem_eio@in-flight-suspend.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-tglb5/igt@gem_eio@in-flight-suspend.html
* igt@gem_exec_parallel@vcs1-contexts:
- shard-tglb: [PASS][6] -> [INCOMPLETE][7] ([i915#435])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-tglb3/igt@gem_exec_parallel@vcs1-contexts.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-tglb4/igt@gem_exec_parallel@vcs1-contexts.html
* igt@gem_exec_schedule@preempt-hang-bsd1:
- shard-iclb: [PASS][8] -> [SKIP][9] ([fdo#109276]) +1 similar issue
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-iclb1/igt@gem_exec_schedule@preempt-hang-bsd1.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-iclb3/igt@gem_exec_schedule@preempt-hang-bsd1.html
* igt@gem_exec_schedule@wide-bsd:
- shard-iclb: [PASS][10] -> [SKIP][11] ([fdo#112146])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-iclb5/igt@gem_exec_schedule@wide-bsd.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-iclb1/igt@gem_exec_schedule@wide-bsd.html
* igt@gem_mmap_gtt@hang:
- shard-snb: [PASS][12] -> [INCOMPLETE][13] ([i915#82])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-snb7/igt@gem_mmap_gtt@hang.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-snb7/igt@gem_mmap_gtt@hang.html
* igt@gem_persistent_relocs@forked-interruptible-thrash-inactive:
- shard-hsw: [PASS][14] -> [FAIL][15] ([i915#520])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-hsw6/igt@gem_persistent_relocs@forked-interruptible-thrash-inactive.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-hsw7/igt@gem_persistent_relocs@forked-interruptible-thrash-inactive.html
* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-glk: [PASS][16] -> [FAIL][17] ([i915#644])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-glk7/igt@gem_ppgtt@flink-and-close-vma-leak.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-glk5/igt@gem_ppgtt@flink-and-close-vma-leak.html
- shard-apl: [PASS][18] -> [FAIL][19] ([i915#644])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-apl2/igt@gem_ppgtt@flink-and-close-vma-leak.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-apl4/igt@gem_ppgtt@flink-and-close-vma-leak.html
* igt@gem_sync@basic-many-each:
- shard-tglb: [PASS][20] -> [INCOMPLETE][21] ([i915#472] / [i915#707])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-tglb8/igt@gem_sync@basic-many-each.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-tglb8/igt@gem_sync@basic-many-each.html
* igt@gem_userptr_blits@map-fixed-invalidate-busy-gup:
- shard-snb: [PASS][22] -> [DMESG-WARN][23] ([fdo#111870]) +1 similar issue
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-snb5/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-snb2/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup.html
* igt@i915_suspend@forcewake:
- shard-apl: [PASS][24] -> [DMESG-WARN][25] ([i915#180])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-apl1/igt@i915_suspend@forcewake.html
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-apl4/igt@i915_suspend@forcewake.html
* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-apl: [PASS][26] -> [FAIL][27] ([i915#54])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-apl8/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-apl2/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-apl: [PASS][28] -> [FAIL][29] ([i915#79])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-apl2/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-apl8/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-hsw: [PASS][30] -> [INCOMPLETE][31] ([i915#61])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-hsw7/igt@kms_flip@flip-vs-suspend-interruptible.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-hsw5/igt@kms_flip@flip-vs-suspend-interruptible.html
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
- shard-glk: [PASS][32] -> [FAIL][33] ([i915#49])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-glk5/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff.html
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-glk1/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-kbl: [PASS][34] -> [DMESG-WARN][35] ([i915#180]) +1 similar issue
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-kbl3/igt@kms_frontbuffer_tracking@fbc-suspend.html
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-kbl4/igt@kms_frontbuffer_tracking@fbc-suspend.html
* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [PASS][36] -> [SKIP][37] ([fdo#109642] / [fdo#111068])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-iclb2/igt@kms_psr2_su@frontbuffer.html
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-iclb6/igt@kms_psr2_su@frontbuffer.html
* igt@kms_psr@psr2_primary_blt:
- shard-iclb: [PASS][38] -> [SKIP][39] ([fdo#109441])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-iclb2/igt@kms_psr@psr2_primary_blt.html
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-iclb3/igt@kms_psr@psr2_primary_blt.html
* igt@kms_setmode@basic:
- shard-apl: [PASS][40] -> [FAIL][41] ([i915#31])
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-apl4/igt@kms_setmode@basic.html
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-apl8/igt@kms_setmode@basic.html
- shard-hsw: [PASS][42] -> [FAIL][43] ([i915#31])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-hsw5/igt@kms_setmode@basic.html
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-hsw1/igt@kms_setmode@basic.html
* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-tglb: [PASS][44] -> [INCOMPLETE][45] ([i915#456] / [i915#460]) +2 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-tglb3/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-tglb4/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
* igt@perf_pmu@busy-vcs1:
- shard-iclb: [PASS][46] -> [SKIP][47] ([fdo#112080]) +3 similar issues
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-iclb2/igt@perf_pmu@busy-vcs1.html
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-iclb3/igt@perf_pmu@busy-vcs1.html
#### Possible fixes ####
* igt@gem_ctx_isolation@rcs0-s3:
- shard-apl: [DMESG-WARN][48] ([i915#180]) -> [PASS][49] +2 similar issues
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-apl6/igt@gem_ctx_isolation@rcs0-s3.html
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-apl8/igt@gem_ctx_isolation@rcs0-s3.html
* igt@gem_eio@reset-stress:
- shard-snb: [FAIL][50] ([i915#232]) -> [PASS][51]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-snb7/igt@gem_eio@reset-stress.html
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-snb4/igt@gem_eio@reset-stress.html
* igt@gem_exec_nop@basic-parallel:
- shard-tglb: [INCOMPLETE][52] ([i915#435]) -> [PASS][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-tglb4/igt@gem_exec_nop@basic-parallel.html
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-tglb1/igt@gem_exec_nop@basic-parallel.html
* igt@gem_exec_schedule@in-order-bsd:
- shard-iclb: [SKIP][54] ([fdo#112146]) -> [PASS][55] +2 similar issues
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-iclb4/igt@gem_exec_schedule@in-order-bsd.html
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-iclb6/igt@gem_exec_schedule@in-order-bsd.html
* {igt@gem_exec_schedule@pi-shared-iova-bsd2}:
- shard-iclb: [SKIP][56] ([fdo#109276]) -> [PASS][57] +8 similar issues
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-iclb8/igt@gem_exec_schedule@pi-shared-iova-bsd2.html
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-iclb1/igt@gem_exec_schedule@pi-shared-iova-bsd2.html
* igt@gem_persistent_relocs@forked-interruptible-thrashing:
- shard-kbl: [FAIL][58] ([i915#520]) -> [PASS][59]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-kbl4/igt@gem_persistent_relocs@forked-interruptible-thrashing.html
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-kbl6/igt@gem_persistent_relocs@forked-interruptible-thrashing.html
* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-kbl: [FAIL][60] ([i915#644]) -> [PASS][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-kbl7/igt@gem_ppgtt@flink-and-close-vma-leak.html
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-kbl2/igt@gem_ppgtt@flink-and-close-vma-leak.html
* igt@gem_userptr_blits@sync-unmap:
- shard-snb: [DMESG-WARN][62] ([fdo#111870]) -> [PASS][63] +1 similar issue
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-snb7/igt@gem_userptr_blits@sync-unmap.html
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-snb6/igt@gem_userptr_blits@sync-unmap.html
* {igt@gen9_exec_parse@allowed-single}:
- shard-apl: [DMESG-WARN][64] ([i915#716]) -> [PASS][65]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-apl7/igt@gen9_exec_parse@allowed-single.html
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-apl7/igt@gen9_exec_parse@allowed-single.html
* igt@kms_fbcon_fbt@fbc-suspend:
- shard-tglb: [INCOMPLETE][66] ([i915#435] / [i915#456] / [i915#460]) -> [PASS][67]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-tglb1/igt@kms_fbcon_fbt@fbc-suspend.html
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-tglb8/igt@kms_fbcon_fbt@fbc-suspend.html
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render:
- shard-tglb: [INCOMPLETE][68] ([i915#474] / [i915#667]) -> [PASS][69]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-tglb4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-tglb7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html
* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-blt:
- shard-glk: [FAIL][70] ([i915#49]) -> [PASS][71]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-glk1/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-blt.html
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-glk8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-blt.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-move:
- shard-iclb: [INCOMPLETE][72] ([i915#123] / [i915#140]) -> [PASS][73]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-move.html
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-move.html
* igt@kms_frontbuffer_tracking@fbcpsr-suspend:
- shard-tglb: [INCOMPLETE][74] ([i915#456] / [i915#460] / [i915#474]) -> [PASS][75]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-tglb2/igt@kms_frontbuffer_tracking@fbcpsr-suspend.html
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-tglb2/igt@kms_frontbuffer_tracking@fbcpsr-suspend.html
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: [DMESG-WARN][76] ([i915#180]) -> [PASS][77] +3 similar issues
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-kbl4/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-kbl3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
* igt@kms_plane_lowres@pipe-b-tiling-none:
- shard-hsw: [DMESG-FAIL][78] ([fdo#103166] / [i915#44]) -> [PASS][79]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-hsw5/igt@kms_plane_lowres@pipe-b-tiling-none.html
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-hsw7/igt@kms_plane_lowres@pipe-b-tiling-none.html
* igt@kms_psr@psr2_suspend:
- shard-tglb: [DMESG-WARN][80] ([i915#402]) -> [PASS][81]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-tglb8/igt@kms_psr@psr2_suspend.html
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-tglb1/igt@kms_psr@psr2_suspend.html
* igt@kms_setmode@basic:
- shard-glk: [FAIL][82] ([i915#31]) -> [PASS][83]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-glk1/igt@kms_setmode@basic.html
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-glk3/igt@kms_setmode@basic.html
* igt@kms_vblank@pipe-a-wait-busy-hang:
- shard-snb: [INCOMPLETE][84] ([i915#82]) -> [PASS][85]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-snb1/igt@kms_vblank@pipe-a-wait-busy-hang.html
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-snb6/igt@kms_vblank@pipe-a-wait-busy-hang.html
* igt@perf_pmu@busy-check-all-vcs1:
- shard-iclb: [SKIP][86] ([fdo#112080]) -> [PASS][87] +5 similar issues
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-iclb5/igt@perf_pmu@busy-check-all-vcs1.html
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-iclb1/igt@perf_pmu@busy-check-all-vcs1.html
#### Warnings ####
* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-kbl: [DMESG-WARN][88] ([i915#180]) -> [DMESG-FAIL][89] ([i915#180] / [i915#54])
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7573/shard-kbl4/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/shard-kbl6/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[i915#123]: https://gitlab.freedesktop.org/drm/intel/issues/123
[i915#140]: https://gitlab.freedesktop.org/drm/intel/issues/140
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#232]: https://gitlab.freedesktop.org/drm/intel/issues/232
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#435]: https://gitlab.freedesktop.org/drm/intel/issues/435
[i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44
[i915#456]: https://gitlab.freedesktop.org/drm/intel/issues/456
[i915#460]: https://gitlab.freedesktop.org/drm/intel/issues/460
[i915#472]: https://gitlab.freedesktop.org/drm/intel/issues/472
[i915#474]: https://gitlab.freedesktop.org/drm/intel/issues/474
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#520]: https://gitlab.freedesktop.org/drm/intel/issues/520
[i915#534]: https://gitlab.freedesktop.org/drm/intel/issues/534
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
[i915#667]: https://gitlab.freedesktop.org/drm/intel/issues/667
[i915#707]: https://gitlab.freedesktop.org/drm/intel/issues/707
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
Participating hosts (11 -> 8)
------------------------------
Missing (3): pig-skl-6260u pig-glk-j5005 pig-hsw-4770r
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5349 -> IGTPW_3865
* Piglit: piglit_4509 -> None
CI-20190529: 20190529
CI_DRM_7573: 5f2c1ea1bfb34f9777b829eec98a974edd82b885 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3865: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/index.html
IGT_5349: 048f58513d8b8ec6bb307a939f0ac959bc0f0e10 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3865/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] [PATCH] intel-gpu-top: Support for client stats
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 18:23 ` Tvrtko Ursulin
1 sibling, 0 replies; 11+ messages in thread
From: Tvrtko Ursulin @ 2019-12-16 18:23 UTC (permalink / raw)
To: igt-dev; +Cc: Brian Welty, Tvrtko Ursulin
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.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
tools/intel_gpu_top.c | 616 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 605 insertions(+), 11 deletions(-)
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index cc8db7c539ed..30bb81739f9f 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -659,23 +659,424 @@ 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)++)
+
+#define SYSFS_ENABLE "/sys/class/drm/card0/clients/enable_stats"
+
+bool __stats_enabled;
+
+static int __set_stats(bool val)
+{
+ int fd, ret;
+
+ fd = open(SYSFS_ENABLE, O_WRONLY);
+ if (fd < 0)
+ return -errno;
+
+ ret = write(fd, val ? "1" : "0", 2);
+ if (ret < 0)
+ return -errno;
+ else if (ret < 2)
+ return 1;
+
+ close(fd);
+
+ return 0;
+}
+
+static void __restore_stats(void)
+{
+ int ret;
+
+ if (__stats_enabled)
+ return;
+
+ ret = __set_stats(false);
+ if (ret)
+ fprintf(stderr, "Failed to disable per-client stats! (%d)\n",
+ ret);
+}
+
+static void __restore_stats_signal(int sig)
+{
+ exit(0);
+}
+
+static int enable_stats(void)
+{
+ int fd, ret;
+
+ fd = open(SYSFS_ENABLE, O_RDONLY);
+ if (fd < 0)
+ return -errno;
+
+ close(fd);
+
+ __stats_enabled = filename_to_u64(SYSFS_ENABLE, 10);
+ if (__stats_enabled)
+ return 0;
+
+ ret = __set_stats(true);
+ if (!ret) {
+ if (atexit(__restore_stats))
+ fprintf(stderr, "Failed to register exit handler!");
+
+ if (signal(SIGINT, __restore_stats_signal))
+ fprintf(stderr, "Failed to register signal handler!");
+ } else {
+ fprintf(stderr, "Failed to enable per-client stats! (%d)\n",
+ ret);
+ }
+
+ return ret;
+}
+
+static struct clients *init_clients(void)
+{
+ struct clients *clients = malloc(sizeof(*clients));
+
+ if (enable_stats()) {
+ free(clients);
+ return NULL;
+ }
+
+ return memset(clients, 0, sizeof(*clients));
+}
+
+#define SYSFS_CLIENTS "/sys/class/drm/card0/clients"
+
+static uint64_t read_client_busy(unsigned int id, unsigned int class)
+{
+ char buf[256];
+ ssize_t ret;
+
+ ret = snprintf(buf, sizeof(buf),
+ SYSFS_CLIENTS "/%u/busy/%u",
+ id, class);
+ assert(ret > 0 && ret < sizeof(buf));
+ if (ret <= 0 || ret == sizeof(buf))
+ return 0;
+
+ return filename_to_u64(buf, 10);
+}
+
+static struct client *
+find_client(struct clients *clients, enum client_status status, unsigned int id)
+{
+ struct client *c;
+ int tmp;
+
+ for_each_client(clients, c, tmp) {
+ if ((status == FREE && c->status == FREE) ||
+ (status == c->status && c->id == id))
+ return c;
+ }
+
+ return NULL;
+}
+
+static void update_client(struct client *c, unsigned int pid, char *name)
+{
+ uint64_t val[c->clients->num_classes];
+ unsigned int i;
+
+ if (c->pid != pid)
+ c->pid = pid;
+
+ if (strncmp(c->name, name, sizeof(c->name)))
+ strncpy(c->name, name, sizeof(c->name));
+
+ for (i = 0; i < c->clients->num_classes; i++)
+ val[i] = read_client_busy(c->id, c->clients->class[i].class);
+
+ c->total = 0;
+
+ for (i = 0; i < c->clients->num_classes; i++) {
+ assert(val[i] >= c->last[i]);
+ c->val[i] = val[i] - c->last[i];
+ c->total += c->val[i];
+ c->last[i] = val[i];
+ }
+
+ c->samples++;
+ c->status = ALIVE;
+}
+
+static int class_cmp(const void *_a, const void *_b)
+{
+ const struct engine_class *a = _a;
+ const struct engine_class *b = _b;
+
+ return a->class - b->class;
+}
+
+static void scan_classes(struct clients *clients, unsigned int id)
+{
+ struct engine_class *classes;
+ unsigned int num, i;
+ struct dirent *dent;
+ char buf[256];
+ int ret;
+ DIR *d;
+
+ ret = snprintf(buf, sizeof(buf), SYSFS_CLIENTS "/%u/busy", id);
+ assert(ret > 0 && ret < sizeof(buf));
+ if (ret <= 0 || ret == sizeof(buf))
+ return;
+
+ d = opendir(buf);
+ if (!d)
+ return;
+
+restart:
+ rewinddir(d);
+
+ num = 0;
+ while ((dent = readdir(d)) != NULL) {
+ if (dent->d_type != DT_REG)
+ continue;
+
+ num++;
+ }
+
+ rewinddir(d);
+
+ classes = calloc(num, sizeof(*classes));
+ assert(classes);
+
+ i = 0;
+ while ((dent = readdir(d)) != NULL) {
+ if (i > num) {
+ // FIXME: free individual names
+ free(classes);
+ goto restart;
+ }
+
+ if (dent->d_type != DT_REG)
+ continue;
+
+ classes[i].class = atoi(dent->d_name);
+ classes[i].name = class_display_name(classes[i].class);
+ i++;
+ }
+
+ closedir(d);
+
+ qsort(classes, num, sizeof(*classes), class_cmp);
+
+ clients->num_classes = num;
+ clients->class = classes;
+}
+
+static void
+add_client(struct clients *clients, unsigned int id, unsigned int pid,
+ char *name)
+{
+ struct client *c;
+
+ assert(!find_client(clients, ALIVE, id));
+
+ c = find_client(clients, FREE, 0);
+ if (!c) {
+ unsigned int idx = clients->num_clients;
+
+ clients->num_clients += (clients->num_clients + 2) / 2;
+ clients->client = realloc(clients->client,
+ clients->num_clients * sizeof(*c));
+ assert(clients->client);
+
+ c = &clients->client[idx];
+ memset(c, 0, (clients->num_clients - idx) * sizeof(*c));
+ }
+
+ if (!clients->num_classes)
+ scan_classes(clients, id);
+
+ c->id = id;
+ c->clients = clients;
+ c->val = calloc(clients->num_classes, sizeof(c->val));
+ c->last = calloc(clients->num_classes, sizeof(c->last));
+ assert(c->val && c->last);
+
+ update_client(c, pid, name);
+}
+
+static void free_client(struct client *c)
+{
+ free(c->val);
+ free(c->last);
+ memset(c, 0, sizeof(*c));
+}
+
+static char *read_client_sysfs(unsigned int id, const char *field)
+{
+ char buf[256];
+ ssize_t ret;
+
+ ret = snprintf(buf, sizeof(buf), SYSFS_CLIENTS "/%u/%s", id, field);
+ assert(ret > 0 && ret < sizeof(buf));
+ if (ret <= 0 || ret == sizeof(buf))
+ return NULL;
+
+ ret = filename_to_buf(buf, buf, sizeof(buf));
+ assert(ret == 0);
+ if (ret)
+ return NULL;
+
+ return strdup(buf);
+}
+
+static void scan_clients(struct clients *clients)
+{
+ struct dirent *dent;
+ struct client *c;
+ char *pid, *name;
+ unsigned int id;
+ int tmp;
+ DIR *d;
+
+ if (!clients)
+ return;
+
+ for_each_client(clients, c, tmp) {
+ if (c->status == ALIVE)
+ c->status = PROBE;
+ }
+
+ d = opendir(SYSFS_CLIENTS);
+ if (!d)
+ return;
+
+ while ((dent = readdir(d)) != NULL) {
+ if (dent->d_type != DT_DIR)
+ continue;
+ if (!isdigit(dent->d_name[0]))
+ continue;
+
+ id = atoi(dent->d_name);
+
+ name = read_client_sysfs(id, "name");
+ assert(name);
+ if (!name)
+ continue;
+
+ pid = read_client_sysfs(id, "pid");
+ assert(pid);
+ if (!pid) {
+ free(name);
+ continue;
+ }
+
+ c = find_client(clients, PROBE, id);
+ if (c) {
+ update_client(c, atoi(pid), name);
+ continue;
+ }
+
+ add_client(clients, id, atoi(pid), name);
+
+ free(name);
+ free(pid);
+ }
+
+ closedir(d);
+
+ for_each_client(clients, c, tmp) {
+ if (c->status == PROBE)
+ free_client(c);
+ }
+}
+
+static int cmp(const void *_a, const void *_b)
+{
+ const struct client *a = _a;
+ const struct client *b = _b;
+ long tot_a = a->total;
+ long tot_b = b->total;
+
+ tot_a *= a->status == ALIVE && a->samples > 1;
+ tot_b *= b->status == ALIVE && b->samples > 1;
+
+ tot_b -= tot_a;
+
+ if (!tot_b)
+ return (int)b->id - a->id;
+
+ while (tot_b > INT_MAX || tot_b < INT_MIN)
+ tot_b /= 2;
+
+ return tot_b;
+}
+
static const char *bars[] = { " ", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█" };
+static void n_spaces(const unsigned int n)
+{
+ unsigned int i;
+
+ for (i = 0; i < n; i++)
+ putchar(' ');
+}
+
static void
print_percentage_bar(double percent, int max_len)
{
- int bar_len = percent * (8 * (max_len - 2)) / 100.0;
- int i;
+ int bar_len, i, len = max_len - 2;
+ const int w = 8;
+
+ assert(max_len > 0);
+
+ bar_len = percent * (w * len) / 100.0;
+ if (bar_len > (len * w))
+ bar_len = len * w;
putchar('|');
- for (i = bar_len; i >= 8; i -= 8)
- printf("%s", bars[8]);
+ for (i = bar_len; i >= w; i -= w)
+ printf("%s", bars[w]);
if (i)
printf("%s", bars[i]);
- for (i = 0; i < (max_len - 2 - (bar_len + 7) / 8); i++)
- putchar(' ');
+ len -= (bar_len + (w - 1)) / w;
+ n_spaces(len);
putchar('|');
}
@@ -775,6 +1176,18 @@ json_close_struct(void)
fflush(stdout);
}
+static void
+__json_add_member(const char *key, const char *val)
+{
+ assert(json_indent_level < ARRAY_SIZE(json_indent));
+
+ fprintf(out, "%s%s\"%s\": \"%s\"",
+ json_struct_members ? ",\n" : "",
+ json_indent[json_indent_level], key, val);
+
+ json_struct_members++;
+}
+
static unsigned int
json_add_member(const struct cnt_group *parent, struct cnt_item *item,
unsigned int headers)
@@ -1075,8 +1488,6 @@ print_header(struct engines *engines, double t,
memmove(&groups[0], &groups[1],
sizeof(groups) - sizeof(groups[0]));
- pops->open_struct(NULL);
-
*consumed = print_groups(groups);
if (output_mode == INTERACTIVE) {
@@ -1217,7 +1628,7 @@ print_engine(struct engines *engines, unsigned int i, double t,
engine->display_name, engine_items[0].buf);
val = pmu_calc(&engine->busy.val, 1e9, t, 100);
- print_percentage_bar(val, max_w - len);
+ print_percentage_bar(val, max_w > len ? max_w - len : 0);
printf("%s\n", buf);
@@ -1232,7 +1643,6 @@ print_engines_footer(struct engines *engines, double t,
int lines, int con_w, int con_h)
{
pops->close_struct();
- pops->close_struct();
if (output_mode == INTERACTIVE) {
if (lines++ < con_h)
@@ -1242,6 +1652,147 @@ print_engines_footer(struct engines *engines, double t,
return lines;
}
+static int
+print_clients_header(struct clients *clients, int lines,
+ int con_w, int con_h, int *class_w)
+{
+ int len;
+
+ if (output_mode == INTERACTIVE) {
+ if (lines++ >= con_h)
+ return lines;
+
+ printf("\033[7m");
+ len = printf("%5s%16s", "PID", "NAME");
+
+ if (lines++ >= con_h || len >= con_w)
+ return lines;
+
+ if (clients->num_classes) {
+ unsigned int i;
+ int width;
+
+ *class_w = width = (con_w - len) / clients->num_classes;
+
+ for (i = 0; i < clients->num_classes; i++) {
+ const char *name = clients->class[i].name;
+ int name_len = strlen(name);
+ int pad = (width - name_len) / 2;
+ int spaces = width - pad - name_len;
+
+ if (pad < 0 || spaces < 0)
+ continue;
+
+ n_spaces(pad);
+ printf("%s", name);
+ n_spaces(spaces);
+ len += pad + name_len + spaces;
+ }
+ }
+
+ n_spaces(con_w - len);
+ printf("\033[0m\n");
+ } else {
+ if (clients->num_classes)
+ pops->open_struct("clients");
+ }
+
+ return lines;
+}
+
+static void count_engines(struct clients *clients, struct engines *engines)
+{
+ unsigned int i;
+
+ for (i = 0; i < engines->num_engines; i++) {
+ struct engine *engine = engine_ptr(engines, i);
+
+ clients->class[engine->class].num_engines++;
+ }
+}
+
+static int
+print_client(struct client *c, struct engines *engines, double t, int lines,
+ int con_w, int con_h, unsigned int period_us, int *class_w)
+{
+ struct clients *clients = c->clients;
+ unsigned int i;
+
+ if (output_mode == INTERACTIVE) {
+ printf("%5u%16s ", c->pid, c->name);
+
+ for (i = 0; i < clients->num_classes; i++) {
+ double pct;
+
+ if (!clients->class[i].num_engines)
+ count_engines(clients, engines);
+
+ pct = (double)c->val[i] / period_us / 1e3 * 100 /
+ clients->class[i].num_engines;
+
+ /*
+ * Guard against possible time-drift between sampling
+ * client data and time we obtained our time-delta from
+ * PMU.
+ */
+ if (pct > 100.0)
+ pct = 100.0;
+
+ print_percentage_bar(pct, *class_w);
+ }
+
+ putchar('\n');
+ } else if (output_mode == JSON) {
+ char buf[64];
+
+ snprintf(buf, sizeof(buf), "%u", c->id);
+ pops->open_struct(buf);
+
+ __json_add_member("name", c->name);
+
+ snprintf(buf, sizeof(buf), "%u", c->pid);
+ __json_add_member("pid", buf);
+
+ pops->open_struct("engine-classes");
+
+ for (i = 0; i < clients->num_classes; i++) {
+ double pct;
+
+ snprintf(buf, sizeof(buf), "%s",
+ clients->class[i].name);
+ pops->open_struct(buf);
+
+ pct = (double)c->val[i] / period_us / 1e3 * 100;
+ snprintf(buf, sizeof(buf), "%f", pct);
+ __json_add_member("busy", buf);
+
+ __json_add_member("unit", "%");
+
+ pops->close_struct();
+ }
+
+ pops->close_struct();
+ pops->close_struct();
+ }
+
+ return lines;
+}
+
+static int
+print_clients_footer(struct clients *clients, double t,
+ int lines, int con_w, int con_h)
+{
+ if (output_mode == INTERACTIVE) {
+ if (lines++ < con_h)
+ printf("\n");
+ } else {
+ if (clients->num_classes)
+ pops->close_struct();
+ }
+
+ return lines;
+}
+
static bool stop_top;
static void sigint_handler(int sig)
@@ -1252,6 +1803,7 @@ static void sigint_handler(int sig)
int main(int argc, char **argv)
{
unsigned int period_us = DEFAULT_PERIOD_MS * 1000;
+ struct clients *clients = NULL;
int con_w = -1, con_h = -1;
char *output_path = NULL;
struct engines *engines;
@@ -1335,12 +1887,16 @@ int main(int argc, char **argv)
return 1;
}
+ clients = init_clients();
+
pmu_sample(engines);
+ scan_clients(clients);
while (!stop_top) {
bool consumed = false;
- int lines = 0;
+ int j, lines = 0;
struct winsize ws;
+ struct client *c;
double t;
/* Update terminal size. */
@@ -1354,10 +1910,18 @@ int main(int argc, char **argv)
pmu_sample(engines);
t = (double)(engines->ts.cur - engines->ts.prev) / 1e9;
+ scan_clients(clients);
+ if (clients) {
+ qsort(clients->client, clients->num_clients,
+ sizeof(*clients->client), cmp);
+ }
+
if (stop_top)
break;
while (!consumed) {
+ pops->open_struct(NULL);
+
lines = print_header(engines, t, lines, con_w, con_h,
&consumed);
@@ -1376,6 +1940,36 @@ int main(int argc, char **argv)
lines = print_engines_footer(engines, t, lines, con_w,
con_h);
+
+ if (clients) {
+ int class_w;
+
+ lines = print_clients_header(clients, lines,
+ con_w, con_h,
+ &class_w);
+
+ for_each_client(clients, c, j) {
+ if (lines++ > con_h)
+ break;
+
+ assert(c->status != PROBE);
+ if (c->status != ALIVE)
+ break;
+
+ if (c->samples < 2)
+ continue;
+
+ lines = print_client(c, engines, t,
+ lines, con_w,
+ con_h, period_us,
+ &class_w);
+ }
+
+ lines = print_clients_footer(clients, t, lines,
+ con_w, con_h);
+ }
+
+ pops->close_struct();
}
if (stop_top)
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for intel_gpu_top per client engine busyness (rev2)
2019-12-16 12:09 [igt-dev] [PATCH i-g-t 0/1] intel_gpu_top per client engine busyness Tvrtko Ursulin
` (2 preceding siblings ...)
2019-12-16 16:44 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2019-12-16 18:53 ` Patchwork
2019-12-17 0:24 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
4 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2019-12-16 18:53 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: igt-dev
== Series Details ==
Series: intel_gpu_top per client engine busyness (rev2)
URL : https://patchwork.freedesktop.org/series/70980/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7574 -> IGTPW_3867
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/index.html
Known issues
------------
Here are the changes found in IGTPW_3867 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_module_load@reload:
- fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] ([i915#109])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/fi-icl-u3/igt@i915_module_load@reload.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/fi-icl-u3/igt@i915_module_load@reload.html
* igt@i915_pm_rpm@module-reload:
- fi-skl-lmem: [PASS][3] -> [DMESG-WARN][4] ([i915#592])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/fi-skl-lmem/igt@i915_pm_rpm@module-reload.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/fi-skl-lmem/igt@i915_pm_rpm@module-reload.html
* igt@i915_selftest@live_blt:
- fi-ivb-3770: [PASS][5] -> [DMESG-FAIL][6] ([i915#725])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/fi-ivb-3770/igt@i915_selftest@live_blt.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/fi-ivb-3770/igt@i915_selftest@live_blt.html
* igt@i915_selftest@live_gem_contexts:
- fi-hsw-peppy: [PASS][7] -> [INCOMPLETE][8] ([i915#694])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [PASS][9] -> [DMESG-WARN][10] ([i915#44])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
#### Possible fixes ####
* igt@gem_close_race@basic-threads:
- fi-byt-j1900: [TIMEOUT][11] ([i915#816]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/fi-byt-j1900/igt@gem_close_race@basic-threads.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/fi-byt-j1900/igt@gem_close_race@basic-threads.html
* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: [FAIL][13] ([i915#178]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html
* igt@kms_busy@basic-flip-pipe-a:
- {fi-tgl-guc}: [DMESG-WARN][15] ([i915#402]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/fi-tgl-guc/igt@kms_busy@basic-flip-pipe-a.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/fi-tgl-guc/igt@kms_busy@basic-flip-pipe-a.html
#### Warnings ####
* igt@i915_selftest@live_blt:
- fi-hsw-4770r: [DMESG-FAIL][17] ([i915#725]) -> [DMESG-FAIL][18] ([i915#563])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/fi-hsw-4770r/igt@i915_selftest@live_blt.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/fi-hsw-4770r/igt@i915_selftest@live_blt.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][19] ([fdo#111096] / [i915#323]) -> [FAIL][20] ([fdo#111407])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
* igt@kms_flip@basic-flip-vs-modeset:
- fi-kbl-x1275: [DMESG-WARN][21] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][22] ([i915#62] / [i915#92]) +4 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/fi-kbl-x1275/igt@kms_flip@basic-flip-vs-modeset.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/fi-kbl-x1275/igt@kms_flip@basic-flip-vs-modeset.html
* igt@kms_pipe_crc_basic@read-crc-pipe-a:
- fi-kbl-x1275: [DMESG-WARN][23] ([i915#62] / [i915#92]) -> [DMESG-WARN][24] ([i915#62] / [i915#92] / [i915#95]) +7 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/fi-kbl-x1275/igt@kms_pipe_crc_basic@read-crc-pipe-a.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/fi-kbl-x1275/igt@kms_pipe_crc_basic@read-crc-pipe-a.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[fdo#111593]: https://bugs.freedesktop.org/show_bug.cgi?id=111593
[i915#109]: https://gitlab.freedesktop.org/drm/intel/issues/109
[i915#178]: https://gitlab.freedesktop.org/drm/intel/issues/178
[i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44
[i915#563]: https://gitlab.freedesktop.org/drm/intel/issues/563
[i915#592]: https://gitlab.freedesktop.org/drm/intel/issues/592
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
[i915#816]: https://gitlab.freedesktop.org/drm/intel/issues/816
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (53 -> 46)
------------------------------
Additional (1): fi-hsw-4770
Missing (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-tgl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5349 -> IGTPW_3867
CI-20190529: 20190529
CI_DRM_7574: 950244ca586c6f0efe243bf8c505c01ea5e579fa @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3867: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/index.html
IGT_5349: 048f58513d8b8ec6bb307a939f0ac959bc0f0e10 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for intel_gpu_top per client engine busyness (rev2)
2019-12-16 12:09 [igt-dev] [PATCH i-g-t 0/1] intel_gpu_top per client engine busyness Tvrtko Ursulin
` (3 preceding siblings ...)
2019-12-16 18:53 ` [igt-dev] ✓ Fi.CI.BAT: success for intel_gpu_top per client engine busyness (rev2) Patchwork
@ 2019-12-17 0:24 ` Patchwork
4 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2019-12-17 0:24 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: igt-dev
== Series Details ==
Series: intel_gpu_top per client engine busyness (rev2)
URL : https://patchwork.freedesktop.org/series/70980/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7574_full -> IGTPW_3867_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/index.html
Known issues
------------
Here are the changes found in IGTPW_3867_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@rcs0-s3:
- shard-tglb: [PASS][1] -> [INCOMPLETE][2] ([i915#456])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb5/igt@gem_ctx_isolation@rcs0-s3.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb8/igt@gem_ctx_isolation@rcs0-s3.html
* igt@gem_ctx_persistence@vcs0-mixed-process:
- shard-iclb: [PASS][3] -> [FAIL][4] ([i915#679])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-iclb5/igt@gem_ctx_persistence@vcs0-mixed-process.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-iclb8/igt@gem_ctx_persistence@vcs0-mixed-process.html
* igt@gem_ctx_persistence@vcs1-persistence:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#109276] / [fdo#112080])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-iclb1/igt@gem_ctx_persistence@vcs1-persistence.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-iclb3/igt@gem_ctx_persistence@vcs1-persistence.html
* igt@gem_exec_balancer@smoke:
- shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#110854])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-iclb2/igt@gem_exec_balancer@smoke.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-iclb6/igt@gem_exec_balancer@smoke.html
* igt@gem_exec_schedule@preempt-other-bsd1:
- shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#109276]) +3 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-iclb2/igt@gem_exec_schedule@preempt-other-bsd1.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-iclb5/igt@gem_exec_schedule@preempt-other-bsd1.html
* igt@gem_exec_schedule@preempt-queue-blt:
- shard-tglb: [PASS][11] -> [INCOMPLETE][12] ([fdo#111677])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb5/igt@gem_exec_schedule@preempt-queue-blt.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb6/igt@gem_exec_schedule@preempt-queue-blt.html
* igt@gem_exec_schedule@reorder-wide-bsd:
- shard-iclb: [PASS][13] -> [SKIP][14] ([fdo#112146]) +2 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-iclb8/igt@gem_exec_schedule@reorder-wide-bsd.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-iclb2/igt@gem_exec_schedule@reorder-wide-bsd.html
* igt@gem_exec_schedule@smoketest-all:
- shard-tglb: [PASS][15] -> [INCOMPLETE][16] ([i915#463])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb3/igt@gem_exec_schedule@smoketest-all.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb4/igt@gem_exec_schedule@smoketest-all.html
* igt@gem_persistent_relocs@forked-interruptible-thrashing:
- shard-kbl: [PASS][17] -> [FAIL][18] ([i915#520])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-kbl2/igt@gem_persistent_relocs@forked-interruptible-thrashing.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-kbl6/igt@gem_persistent_relocs@forked-interruptible-thrashing.html
* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-glk: [PASS][19] -> [FAIL][20] ([i915#644])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-glk8/igt@gem_ppgtt@flink-and-close-vma-leak.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-glk9/igt@gem_ppgtt@flink-and-close-vma-leak.html
* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
- shard-snb: [PASS][21] -> [DMESG-WARN][22] ([fdo#111870])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-snb7/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-snb6/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html
* igt@i915_selftest@live_gem_contexts:
- shard-tglb: [PASS][23] -> [INCOMPLETE][24] ([i915#455])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb5/igt@i915_selftest@live_gem_contexts.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb6/igt@i915_selftest@live_gem_contexts.html
* igt@i915_selftest@mock_sanitycheck:
- shard-hsw: [PASS][25] -> [DMESG-WARN][26] ([i915#747])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-hsw7/igt@i915_selftest@mock_sanitycheck.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-hsw4/igt@i915_selftest@mock_sanitycheck.html
- shard-snb: [PASS][27] -> [DMESG-WARN][28] ([i915#747])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-snb4/igt@i915_selftest@mock_sanitycheck.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-snb1/igt@i915_selftest@mock_sanitycheck.html
* igt@i915_suspend@debugfs-reader:
- shard-apl: [PASS][29] -> [DMESG-WARN][30] ([i915#180]) +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-apl3/igt@i915_suspend@debugfs-reader.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-apl1/igt@i915_suspend@debugfs-reader.html
* igt@kms_cursor_crc@pipe-c-cursor-dpms:
- shard-iclb: [PASS][31] -> [DMESG-WARN][32] ([IGT#6])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-iclb1/igt@kms_cursor_crc@pipe-c-cursor-dpms.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-iclb3/igt@kms_cursor_crc@pipe-c-cursor-dpms.html
* igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
- shard-tglb: [PASS][33] -> [FAIL][34] ([i915#49])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb9/igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb5/igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-tglb: [PASS][35] -> [INCOMPLETE][36] ([i915#456] / [i915#460] / [i915#474])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb7/igt@kms_frontbuffer_tracking@fbc-suspend.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb2/igt@kms_frontbuffer_tracking@fbc-suspend.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-gtt:
- shard-tglb: [PASS][37] -> [INCOMPLETE][38] ([fdo#112393] / [i915#435] / [i915#667])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb7/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-gtt.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb3/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-gtt.html
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- shard-tglb: [PASS][39] -> [INCOMPLETE][40] ([i915#456] / [i915#460]) +3 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b.html
* igt@kms_plane@pixel-format-pipe-b-planes:
- shard-kbl: [PASS][41] -> [INCOMPLETE][42] ([fdo#103665] / [i915#648] / [i915#667]) +1 similar issue
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-kbl4/igt@kms_plane@pixel-format-pipe-b-planes.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-kbl3/igt@kms_plane@pixel-format-pipe-b-planes.html
* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [PASS][43] -> [SKIP][44] ([fdo#109441])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-iclb6/igt@kms_psr@psr2_primary_mmap_cpu.html
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-kbl: [PASS][45] -> [DMESG-WARN][46] ([i915#180]) +6 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-kbl6/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-kbl6/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
* igt@perf_pmu@busy-idle-no-semaphores-vcs1:
- shard-iclb: [PASS][47] -> [SKIP][48] ([fdo#112080]) +4 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-iclb1/igt@perf_pmu@busy-idle-no-semaphores-vcs1.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-iclb3/igt@perf_pmu@busy-idle-no-semaphores-vcs1.html
#### Possible fixes ####
* igt@gem_ctx_isolation@vcs1-none:
- shard-iclb: [SKIP][49] ([fdo#109276] / [fdo#112080]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-iclb6/igt@gem_ctx_isolation@vcs1-none.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-iclb2/igt@gem_ctx_isolation@vcs1-none.html
* igt@gem_ctx_shared@q-smoketest-vebox:
- shard-tglb: [INCOMPLETE][51] ([fdo#111735]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb6/igt@gem_ctx_shared@q-smoketest-vebox.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb8/igt@gem_ctx_shared@q-smoketest-vebox.html
* igt@gem_exec_capture@capture-bsd2:
- shard-iclb: [SKIP][53] ([fdo#109276]) -> [PASS][54] +3 similar issues
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-iclb6/igt@gem_exec_capture@capture-bsd2.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-iclb2/igt@gem_exec_capture@capture-bsd2.html
* {igt@gem_exec_schedule@pi-shared-iova-bsd}:
- shard-iclb: [SKIP][55] ([i915#677]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-iclb2/igt@gem_exec_schedule@pi-shared-iova-bsd.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-iclb8/igt@gem_exec_schedule@pi-shared-iova-bsd.html
* igt@gem_exec_schedule@preempt-bsd:
- shard-iclb: [SKIP][57] ([fdo#112146]) -> [PASS][58] +2 similar issues
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-iclb2/igt@gem_exec_schedule@preempt-bsd.html
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-iclb8/igt@gem_exec_schedule@preempt-bsd.html
* igt@gem_exec_schedule@preempt-queue-contexts-chain-vebox:
- shard-tglb: [INCOMPLETE][59] ([fdo#111606] / [fdo#111677]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb6/igt@gem_exec_schedule@preempt-queue-contexts-chain-vebox.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb7/igt@gem_exec_schedule@preempt-queue-contexts-chain-vebox.html
* igt@gem_persistent_relocs@forked-faulting-reloc-thrash-inactive:
- shard-glk: [TIMEOUT][61] ([i915#530]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-glk7/igt@gem_persistent_relocs@forked-faulting-reloc-thrash-inactive.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-glk1/igt@gem_persistent_relocs@forked-faulting-reloc-thrash-inactive.html
* igt@gem_softpin@noreloc-s3:
- shard-apl: [DMESG-WARN][63] ([i915#180]) -> [PASS][64] +1 similar issue
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-apl8/igt@gem_softpin@noreloc-s3.html
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-apl7/igt@gem_softpin@noreloc-s3.html
- shard-tglb: [INCOMPLETE][65] ([i915#456]) -> [PASS][66] +1 similar issue
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb2/igt@gem_softpin@noreloc-s3.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb9/igt@gem_softpin@noreloc-s3.html
* igt@gem_userptr_blits@dmabuf-sync:
- shard-snb: [DMESG-WARN][67] ([fdo#111870]) -> [PASS][68] +1 similar issue
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-snb2/igt@gem_userptr_blits@dmabuf-sync.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-snb5/igt@gem_userptr_blits@dmabuf-sync.html
* igt@kms_cursor_crc@pipe-a-cursor-256x256-offscreen:
- shard-hsw: [DMESG-WARN][69] ([IGT#6]) -> [PASS][70] +1 similar issue
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-hsw6/igt@kms_cursor_crc@pipe-a-cursor-256x256-offscreen.html
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-hsw6/igt@kms_cursor_crc@pipe-a-cursor-256x256-offscreen.html
* igt@kms_cursor_crc@pipe-a-cursor-64x64-sliding:
- shard-apl: [DMESG-WARN][71] ([IGT#6]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-apl3/igt@kms_cursor_crc@pipe-a-cursor-64x64-sliding.html
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-apl2/igt@kms_cursor_crc@pipe-a-cursor-64x64-sliding.html
* igt@kms_flip@2x-dpms-vs-vblank-race:
- shard-hsw: [DMESG-FAIL][73] ([i915#407] / [i915#44]) -> [PASS][74]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-hsw5/igt@kms_flip@2x-dpms-vs-vblank-race.html
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-hsw6/igt@kms_flip@2x-dpms-vs-vblank-race.html
* igt@kms_flip@plain-flip-fb-recreate:
- shard-hsw: [DMESG-FAIL][75] ([i915#44]) -> [PASS][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-hsw5/igt@kms_flip@plain-flip-fb-recreate.html
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-hsw8/igt@kms_flip@plain-flip-fb-recreate.html
* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-blt:
- shard-glk: [FAIL][77] ([i915#49]) -> [PASS][78]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-glk9/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-blt.html
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-glk9/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-blt.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-kbl: [DMESG-WARN][79] ([i915#180]) -> [PASS][80] +5 similar issues
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-kbl2/igt@kms_frontbuffer_tracking@fbc-suspend.html
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-kbl7/igt@kms_frontbuffer_tracking@fbc-suspend.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-move:
- shard-tglb: [INCOMPLETE][81] ([i915#474] / [i915#667]) -> [PASS][82]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-move.html
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-move.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-render:
- shard-iclb: [INCOMPLETE][83] ([i915#123] / [i915#140]) -> [PASS][84]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-iclb5/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-render.html
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-iclb6/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-render.html
* igt@kms_setmode@basic:
- shard-glk: [FAIL][85] ([i915#31]) -> [PASS][86]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-glk9/igt@kms_setmode@basic.html
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-glk2/igt@kms_setmode@basic.html
* igt@perf@create-destroy-userspace-config:
- shard-hsw: [INCOMPLETE][87] ([i915#61]) -> [PASS][88]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-hsw6/igt@perf@create-destroy-userspace-config.html
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-hsw4/igt@perf@create-destroy-userspace-config.html
#### Warnings ####
* igt@gem_ctx_isolation@vcs2-dirty-create:
- shard-tglb: [SKIP][89] ([fdo#111912] / [fdo#112080]) -> [SKIP][90] ([fdo#112080])
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb2/igt@gem_ctx_isolation@vcs2-dirty-create.html
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb9/igt@gem_ctx_isolation@vcs2-dirty-create.html
* igt@gem_ctx_isolation@vcs2-dirty-switch:
- shard-tglb: [SKIP][91] ([fdo#112080]) -> [SKIP][92] ([fdo#111912] / [fdo#112080])
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb9/igt@gem_ctx_isolation@vcs2-dirty-switch.html
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb3/igt@gem_ctx_isolation@vcs2-dirty-switch.html
* igt@gem_tiled_blits@interruptible:
- shard-hsw: [FAIL][93] ([i915#832]) -> [FAIL][94] ([i915#818])
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-hsw6/igt@gem_tiled_blits@interruptible.html
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-hsw7/igt@gem_tiled_blits@interruptible.html
* igt@gem_tiled_blits@normal:
- shard-hsw: [FAIL][95] ([i915#818]) -> [INCOMPLETE][96] ([i915#61])
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-hsw1/igt@gem_tiled_blits@normal.html
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-hsw1/igt@gem_tiled_blits@normal.html
* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-snb: [DMESG-WARN][97] ([fdo#111870]) -> [DMESG-WARN][98] ([fdo#110789] / [fdo#111870])
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-snb4/igt@gem_userptr_blits@sync-unmap-cycles.html
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-snb7/igt@gem_userptr_blits@sync-unmap-cycles.html
* igt@i915_pm_rps@waitboost:
- shard-tglb: [FAIL][99] ([i915#39]) -> [FAIL][100] ([i915#413])
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7574/shard-tglb5/igt@i915_pm_rps@waitboost.html
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/shard-tglb5/igt@i915_pm_rps@waitboost.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#6]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/6
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110789]: https://bugs.freedesktop.org/show_bug.cgi?id=110789
[fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[fdo#111606]: https://bugs.freedesktop.org/show_bug.cgi?id=111606
[fdo#111677]: https://bugs.freedesktop.org/show_bug.cgi?id=111677
[fdo#111735]: https://bugs.freedesktop.org/show_bug.cgi?id=111735
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#111912]: https://bugs.freedesktop.org/show_bug.cgi?id=111912
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[fdo#112393]: https://bugs.freedesktop.org/show_bug.cgi?id=112393
[i915#123]: https://gitlab.freedesktop.org/drm/intel/issues/123
[i915#140]: https://gitlab.freedesktop.org/drm/intel/issues/140
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#39]: https://gitlab.freedesktop.org/drm/intel/issues/39
[i915#407]: https://gitlab.freedesktop.org/drm/intel/issues/407
[i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
[i915#435]: https://gitlab.freedesktop.org/drm/intel/issues/435
[i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44
[i915#455]: https://gitlab.freedesktop.org/drm/intel/issues/455
[i915#456]: https://gitlab.freedesktop.org/drm/intel/issues/456
[i915#460]: https://gitlab.freedesktop.org/drm/intel/issues/460
[i915#463]: https://gitlab.freedesktop.org/drm/intel/issues/463
[i915#474]: https://gitlab.freedesktop.org/drm/intel/issues/474
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#520]: https://gitlab.freedesktop.org/drm/intel/issues/520
[i915#530]: https://gitlab.freedesktop.org/drm/intel/issues/530
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
[i915#648]: https://gitlab.freedesktop.org/drm/intel/issues/648
[i915#667]: https://gitlab.freedesktop.org/drm/intel/issues/667
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#679]: https://gitlab.freedesktop.org/drm/intel/issues/679
[i915#747]: https://gitlab.freedesktop.org/drm/intel/issues/747
[i915#818]: https://gitlab.freedesktop.org/drm/intel/issues/818
[i915#832]: https://gitlab.freedesktop.org/drm/intel/issues/832
Participating hosts (10 -> 8)
------------------------------
Missing (2): pig-skl-6260u pig-glk-j5005
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5349 -> IGTPW_3867
* Piglit: piglit_4509 -> None
CI-20190529: 20190529
CI_DRM_7574: 950244ca586c6f0efe243bf8c505c01ea5e579fa @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3867: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/index.html
IGT_5349: 048f58513d8b8ec6bb307a939f0ac959bc0f0e10 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3867/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] [PATCH i-g-t 1/1] intel-gpu-top: Support for client stats
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 ` Tvrtko Ursulin
2020-09-07 9:31 ` Petri Latvala
0 siblings, 1 reply; 11+ messages in thread
From: Tvrtko Ursulin @ 2020-09-04 13:06 UTC (permalink / raw)
To: igt-dev; +Cc: Intel-gfx, Tvrtko Ursulin
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"
+
+static uint64_t read_client_busy(unsigned int id, unsigned int class)
+{
+ char buf[256];
+ ssize_t ret;
+
+ ret = snprintf(buf, sizeof(buf),
+ SYSFS_CLIENTS "/%u/busy/%u",
+ id, class);
+ assert(ret > 0 && ret < sizeof(buf));
+ if (ret <= 0 || ret == sizeof(buf))
+ return 0;
+
+ return filename_to_u64(buf, 10);
+}
+
+static struct client *
+find_client(struct clients *clients, enum client_status status, unsigned int id)
+{
+ struct client *c;
+ int tmp;
+
+ for_each_client(clients, c, tmp) {
+ if ((status == FREE && c->status == FREE) ||
+ (status == c->status && c->id == id))
+ return c;
+ }
+
+ return NULL;
+}
+
+static void update_client(struct client *c, unsigned int pid, char *name)
+{
+ uint64_t val[c->clients->num_classes];
+ unsigned int i;
+
+ if (c->pid != pid)
+ c->pid = pid;
+
+ if (strcmp(c->name, name))
+ strncpy(c->name, name, sizeof(c->name) - 1);
+
+ for (i = 0; i < c->clients->num_classes; i++)
+ val[i] = read_client_busy(c->id, c->clients->class[i].class);
+
+ c->total = 0;
+
+ for (i = 0; i < c->clients->num_classes; i++) {
+ if (val[i] < c->last[i])
+ continue; /* It will catch up soon. */
+
+ c->val[i] = val[i] - c->last[i];
+ c->total += c->val[i];
+ c->last[i] = val[i];
+ }
+
+ c->samples++;
+ c->status = ALIVE;
+}
+
+static int class_cmp(const void *_a, const void *_b)
+{
+ const struct engine_class *a = _a;
+ const struct engine_class *b = _b;
+
+ return a->class - b->class;
+}
+
+static void scan_classes(struct clients *clients, unsigned int id)
+{
+ struct engine_class *classes;
+ unsigned int num, i;
+ struct dirent *dent;
+ char buf[256];
+ int ret;
+ DIR *d;
+
+ ret = snprintf(buf, sizeof(buf), SYSFS_CLIENTS "/%u/busy", id);
+ assert(ret > 0 && ret < sizeof(buf));
+ if (ret <= 0 || ret == sizeof(buf))
+ return;
+
+ d = opendir(buf);
+ if (!d)
+ return;
+
+restart:
+ rewinddir(d);
+
+ num = 0;
+ while ((dent = readdir(d)) != NULL) {
+ if (dent->d_type != DT_REG)
+ continue;
+
+ num++;
+ }
+
+ rewinddir(d);
+
+ classes = calloc(num, sizeof(*classes));
+ assert(classes);
+
+ i = 0;
+ while ((dent = readdir(d)) != NULL) {
+ if (i > num) {
+ // FIXME: free individual names
+ free(classes);
+ goto restart;
+ }
+
+ if (dent->d_type != DT_REG)
+ continue;
+
+ classes[i].class = atoi(dent->d_name);
+ classes[i].name = class_display_name(classes[i].class);
+ i++;
+ }
+
+ closedir(d);
+
+ qsort(classes, num, sizeof(*classes), class_cmp);
+
+ clients->num_classes = num;
+ clients->class = classes;
+}
+
+static void
+add_client(struct clients *clients, unsigned int id, unsigned int pid,
+ char *name)
+{
+ struct client *c;
+
+ if (find_client(clients, ALIVE, id))
+ return;
+
+ c = find_client(clients, FREE, 0);
+ if (!c) {
+ unsigned int idx = clients->num_clients;
+
+ clients->num_clients += (clients->num_clients + 2) / 2;
+ clients->client = realloc(clients->client,
+ clients->num_clients * sizeof(*c));
+ assert(clients->client);
+
+ c = &clients->client[idx];
+ memset(c, 0, (clients->num_clients - idx) * sizeof(*c));
+ }
+
+ if (!clients->num_classes)
+ scan_classes(clients, id);
+
+ c->id = id;
+ c->clients = clients;
+ c->val = calloc(clients->num_classes, sizeof(c->val));
+ c->last = calloc(clients->num_classes, sizeof(c->last));
+ assert(c->val && c->last);
+
+ update_client(c, pid, name);
+}
+
+static void free_client(struct client *c)
+{
+ free(c->val);
+ free(c->last);
+ memset(c, 0, sizeof(*c));
+}
+
+static char *read_client_sysfs(unsigned int id, const char *field)
+{
+ char buf[256];
+ ssize_t ret;
+
+ ret = snprintf(buf, sizeof(buf), SYSFS_CLIENTS "/%u/%s", id, field);
+ assert(ret > 0 && ret < sizeof(buf));
+ if (ret <= 0 || ret == sizeof(buf))
+ return NULL;
+
+ ret = filename_to_buf(buf, buf, sizeof(buf));
+ if (ret)
+ return NULL; /* Client exited. */
+
+ return strdup(buf);
+}
+
+static void scan_clients(struct clients *clients)
+{
+ struct dirent *dent;
+ struct client *c;
+ char *pid, *name;
+ unsigned int id;
+ int tmp;
+ DIR *d;
+
+ if (!clients)
+ return;
+
+ for_each_client(clients, c, tmp) {
+ if (c->status == ALIVE)
+ c->status = PROBE;
+ }
+
+ d = opendir(SYSFS_CLIENTS);
+ if (!d)
+ return;
+
+ while ((dent = readdir(d)) != NULL) {
+ if (dent->d_type != DT_DIR)
+ continue;
+ if (!isdigit(dent->d_name[0]))
+ continue;
+
+ id = atoi(dent->d_name);
+
+ c = find_client(clients, PROBE, id);
+
+ name = read_client_sysfs(id, "name");
+ pid = read_client_sysfs(id, "pid");
+
+ if (name && pid) {
+ if (!c)
+ add_client(clients, id, atoi(pid), name);
+ else
+ update_client(c, atoi(pid), name);
+ } else if (c) {
+ c->status = PROBE; /* Will be deleted below. */
+ }
+
+ if (name)
+ free(name);
+ if (pid)
+ free(pid);
+ }
+
+ closedir(d);
+
+ for_each_client(clients, c, tmp) {
+ if (c->status == PROBE)
+ free_client(c);
+ }
+}
+
+static int cmp(const void *_a, const void *_b)
+{
+ const struct client *a = _a;
+ const struct client *b = _b;
+ long tot_a = a->total;
+ long tot_b = b->total;
+
+ tot_a *= a->status == ALIVE && a->samples > 1;
+ tot_b *= b->status == ALIVE && b->samples > 1;
+
+ tot_b -= tot_a;
+
+ if (!tot_b)
+ return (int)b->id - a->id;
+
+ while (tot_b > INT_MAX || tot_b < INT_MIN)
+ tot_b /= 2;
+
+ return tot_b;
+}
+
static const char *bars[] = { " ", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█" };
+static void n_spaces(const unsigned int n)
+{
+ unsigned int i;
+
+ for (i = 0; i < n; i++)
+ putchar(' ');
+}
+
static void
print_percentage_bar(double percent, int max_len)
{
- int bar_len = percent * (8 * (max_len - 2)) / 100.0;
- int i;
+ int bar_len, i, len = max_len - 2;
+ const int w = 8;
+
+ assert(max_len > 0);
+
+ bar_len = percent * (w * len) / 100.0;
+ if (bar_len > (len * w))
+ bar_len = len * w;
putchar('|');
- for (i = bar_len; i >= 8; i -= 8)
- printf("%s", bars[8]);
+ for (i = bar_len; i >= w; i -= w)
+ printf("%s", bars[w]);
if (i)
printf("%s", bars[i]);
- for (i = 0; i < (max_len - 2 - (bar_len + 7) / 8); i++)
- putchar(' ');
+ len -= (bar_len + (w - 1)) / w;
+ n_spaces(len);
putchar('|');
}
@@ -798,6 +1122,18 @@ json_close_struct(void)
fflush(stdout);
}
+static void
+__json_add_member(const char *key, const char *val)
+{
+ assert(json_indent_level < ARRAY_SIZE(json_indent));
+
+ fprintf(out, "%s%s\"%s\": \"%s\"",
+ json_struct_members ? ",\n" : "",
+ json_indent[json_indent_level], key, val);
+
+ json_struct_members++;
+}
+
static unsigned int
json_add_member(const struct cnt_group *parent, struct cnt_item *item,
unsigned int headers)
@@ -1098,8 +1434,6 @@ print_header(struct engines *engines, double t,
memmove(&groups[0], &groups[1],
sizeof(groups) - sizeof(groups[0]));
- pops->open_struct(NULL);
-
*consumed = print_groups(groups);
if (output_mode == INTERACTIVE) {
@@ -1245,7 +1579,7 @@ print_engine(struct engines *engines, unsigned int i, double t,
engine->display_name, engine_items[0].buf);
val = pmu_calc(&engine->busy.val, 1e9, t, 100);
- print_percentage_bar(val, max_w - len);
+ print_percentage_bar(val, max_w > len ? max_w - len : 0);
printf("%s\n", buf);
@@ -1260,7 +1594,6 @@ print_engines_footer(struct engines *engines, double t,
int lines, int con_w, int con_h)
{
pops->close_struct();
- pops->close_struct();
if (output_mode == INTERACTIVE) {
if (lines++ < con_h)
@@ -1270,6 +1603,147 @@ print_engines_footer(struct engines *engines, double t,
return lines;
}
+static int
+print_clients_header(struct clients *clients, int lines,
+ int con_w, int con_h, int *class_w)
+{
+ int len;
+
+ if (output_mode == INTERACTIVE) {
+ if (lines++ >= con_h)
+ return lines;
+
+ printf("\033[7m");
+ len = printf("%5s%16s", "PID", "NAME");
+
+ if (lines++ >= con_h || len >= con_w)
+ return lines;
+
+ if (clients->num_classes) {
+ unsigned int i;
+ int width;
+
+ *class_w = width = (con_w - len) / clients->num_classes;
+
+ for (i = 0; i < clients->num_classes; i++) {
+ const char *name = clients->class[i].name;
+ int name_len = strlen(name);
+ int pad = (width - name_len) / 2;
+ int spaces = width - pad - name_len;
+
+ if (pad < 0 || spaces < 0)
+ continue;
+
+ n_spaces(pad);
+ printf("%s", name);
+ n_spaces(spaces);
+ len += pad + name_len + spaces;
+ }
+ }
+
+ n_spaces(con_w - len);
+ printf("\033[0m\n");
+ } else {
+ if (clients->num_classes)
+ pops->open_struct("clients");
+ }
+
+ return lines;
+}
+
+static void count_engines(struct clients *clients, struct engines *engines)
+{
+ unsigned int i;
+
+ for (i = 0; i < engines->num_engines; i++) {
+ struct engine *engine = engine_ptr(engines, i);
+
+ clients->class[engine->class].num_engines++;
+ }
+}
+
+static int
+print_client(struct client *c, struct engines *engines, double t, int lines,
+ int con_w, int con_h, unsigned int period_us, int *class_w)
+{
+ struct clients *clients = c->clients;
+ unsigned int i;
+
+ if (output_mode == INTERACTIVE) {
+ printf("%5u%16s ", c->pid, c->name);
+
+ for (i = 0; i < clients->num_classes; i++) {
+ double pct;
+
+ if (!clients->class[i].num_engines)
+ count_engines(clients, engines);
+
+ pct = (double)c->val[i] / period_us / 1e3 * 100 /
+ clients->class[i].num_engines;
+
+ /*
+ * Guard against possible time-drift between sampling
+ * client data and time we obtained our time-delta from
+ * PMU.
+ */
+ if (pct > 100.0)
+ pct = 100.0;
+
+ print_percentage_bar(pct, *class_w);
+ }
+
+ putchar('\n');
+ } else if (output_mode == JSON) {
+ char buf[64];
+
+ snprintf(buf, sizeof(buf), "%u", c->id);
+ pops->open_struct(buf);
+
+ __json_add_member("name", c->name);
+
+ snprintf(buf, sizeof(buf), "%u", c->pid);
+ __json_add_member("pid", buf);
+
+ pops->open_struct("engine-classes");
+
+ for (i = 0; i < clients->num_classes; i++) {
+ double pct;
+
+ snprintf(buf, sizeof(buf), "%s",
+ clients->class[i].name);
+ pops->open_struct(buf);
+
+ pct = (double)c->val[i] / period_us / 1e3 * 100;
+ snprintf(buf, sizeof(buf), "%f", pct);
+ __json_add_member("busy", buf);
+
+ __json_add_member("unit", "%");
+
+ pops->close_struct();
+ }
+
+ pops->close_struct();
+ pops->close_struct();
+ }
+
+ return lines;
+}
+
+static int
+print_clients_footer(struct clients *clients, double t,
+ int lines, int con_w, int con_h)
+{
+ if (output_mode == INTERACTIVE) {
+ if (lines++ < con_h)
+ printf("\n");
+ } else {
+ if (clients->num_classes)
+ pops->close_struct();
+ }
+
+ return lines;
+}
+
static bool stop_top;
static void sigint_handler(int sig)
@@ -1307,6 +1781,7 @@ static char *tr_pmu_name(struct igt_device_card *card)
int main(int argc, char **argv)
{
unsigned int period_us = DEFAULT_PERIOD_MS * 1000;
+ struct clients *clients = NULL;
int con_w = -1, con_h = -1;
char *output_path = NULL;
struct engines *engines;
@@ -1429,12 +1904,16 @@ int main(int argc, char **argv)
ret = EXIT_SUCCESS;
+ clients = init_clients();
+
pmu_sample(engines);
+ scan_clients(clients);
while (!stop_top) {
bool consumed = false;
- int lines = 0;
+ int j, lines = 0;
struct winsize ws;
+ struct client *c;
double t;
/* Update terminal size. */
@@ -1448,10 +1927,18 @@ int main(int argc, char **argv)
pmu_sample(engines);
t = (double)(engines->ts.cur - engines->ts.prev) / 1e9;
+ scan_clients(clients);
+ if (clients) {
+ qsort(clients->client, clients->num_clients,
+ sizeof(*clients->client), cmp);
+ }
+
if (stop_top)
break;
while (!consumed) {
+ pops->open_struct(NULL);
+
lines = print_header(engines, t, lines, con_w, con_h,
&consumed);
@@ -1470,6 +1957,36 @@ int main(int argc, char **argv)
lines = print_engines_footer(engines, t, lines, con_w,
con_h);
+
+ if (clients) {
+ int class_w;
+
+ lines = print_clients_header(clients, lines,
+ con_w, con_h,
+ &class_w);
+
+ for_each_client(clients, c, j) {
+ if (lines++ > con_h)
+ break;
+
+ assert(c->status != PROBE);
+ if (c->status != ALIVE)
+ break;
+
+ if (c->samples < 2)
+ continue;
+
+ lines = print_client(c, engines, t,
+ lines, con_w,
+ con_h, period_us,
+ &class_w);
+ }
+
+ lines = print_clients_footer(clients, t, lines,
+ con_w, con_h);
+ }
+
+ pops->close_struct();
}
if (stop_top)
--
2.25.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/1] intel-gpu-top: Support for client stats
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
0 siblings, 0 replies; 11+ messages in thread
From: Petri Latvala @ 2020-09-07 9:31 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: igt-dev, Intel-gfx, Tvrtko Ursulin
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
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-09-07 9:31 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-12-16 18:23 ` [igt-dev] [PATCH] " Tvrtko Ursulin
2019-12-16 14:52 ` [igt-dev] ✓ Fi.CI.BAT: success for intel_gpu_top per client engine busyness Patchwork
2019-12-16 16:44 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-12-16 18:53 ` [igt-dev] ✓ Fi.CI.BAT: success for intel_gpu_top per client engine busyness (rev2) Patchwork
2019-12-17 0:24 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox