* [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Hide unused clients
@ 2021-01-31 3:11 Chris Wilson
2021-02-01 8:14 ` Tvrtko Ursulin
2021-02-01 8:53 ` Chris Wilson
0 siblings, 2 replies; 11+ messages in thread
From: Chris Wilson @ 2021-01-31 3:11 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev, Chris Wilson
Keep new clients hidden until they utilise the GPU.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
---
tools/intel_gpu_top.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 60ff62d28..66a8effa6 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -828,8 +828,11 @@ static void update_client(struct client *c, unsigned int pid, char *name)
c->last[i] = val[i];
}
- c->samples++;
+ if (!c->total_runtime)
+ return;
+
c->status = ALIVE;
+ c->samples++;
}
static void
--
2.30.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Hide unused clients
2021-01-31 3:11 [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Hide unused clients Chris Wilson
@ 2021-02-01 8:14 ` Tvrtko Ursulin
2021-02-01 8:21 ` Chris Wilson
2021-02-01 8:53 ` Chris Wilson
1 sibling, 1 reply; 11+ messages in thread
From: Tvrtko Ursulin @ 2021-02-01 8:14 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: igt-dev
On 31/01/2021 03:11, Chris Wilson wrote:
> Keep new clients hidden until they utilise the GPU.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> ---
> tools/intel_gpu_top.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
> index 60ff62d28..66a8effa6 100644
> --- a/tools/intel_gpu_top.c
> +++ b/tools/intel_gpu_top.c
> @@ -828,8 +828,11 @@ static void update_client(struct client *c, unsigned int pid, char *name)
> c->last[i] = val[i];
> }
>
> - c->samples++;
> + if (!c->total_runtime)
> + return;
> +
> c->status = ALIVE;
> + c->samples++;
> }
>
> static void
>
Not sure we need to do it at this level and not instead at presentation
time. Plus, in default sort mode they would be at the end of the list,
so behind the more active clients. Or you go into sort by id and they
annoy you there?
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Hide unused clients
2021-02-01 8:14 ` Tvrtko Ursulin
@ 2021-02-01 8:21 ` Chris Wilson
2021-02-01 8:36 ` Tvrtko Ursulin
0 siblings, 1 reply; 11+ messages in thread
From: Chris Wilson @ 2021-02-01 8:21 UTC (permalink / raw)
To: Tvrtko Ursulin, intel-gfx; +Cc: igt-dev
Quoting Tvrtko Ursulin (2021-02-01 08:14:45)
>
> On 31/01/2021 03:11, Chris Wilson wrote:
> > Keep new clients hidden until they utilise the GPU.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> > ---
> > tools/intel_gpu_top.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
> > index 60ff62d28..66a8effa6 100644
> > --- a/tools/intel_gpu_top.c
> > +++ b/tools/intel_gpu_top.c
> > @@ -828,8 +828,11 @@ static void update_client(struct client *c, unsigned int pid, char *name)
> > c->last[i] = val[i];
> > }
> >
> > - c->samples++;
> > + if (!c->total_runtime)
> > + return;
> > +
> > c->status = ALIVE;
> > + c->samples++;
> > }
> >
> > static void
> >
>
> Not sure we need to do it at this level and not instead at presentation
> time.
My goal was just presentation :(
> Plus, in default sort mode they would be at the end of the list,
> so behind the more active clients. Or you go into sort by id and they
> annoy you there?
No. I had a bunch of "Xorg" when launching steam which never became
anything. So I guess just a bunch of dlopen("libgl") spawing a bunch of
clients that we never used for anything more than gl[X]GetString, but
leaked the fd.
[Why does steam need 10% of the gpu to update an icon on the toolbar
which is hidden while minimised? Why do games sit in static menus at
100% gpu? Why?]
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Hide unused clients
2021-02-01 8:21 ` Chris Wilson
@ 2021-02-01 8:36 ` Tvrtko Ursulin
2021-02-01 8:49 ` Chris Wilson
0 siblings, 1 reply; 11+ messages in thread
From: Tvrtko Ursulin @ 2021-02-01 8:36 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: igt-dev
On 01/02/2021 08:21, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2021-02-01 08:14:45)
>>
>> On 31/01/2021 03:11, Chris Wilson wrote:
>>> Keep new clients hidden until they utilise the GPU.
>>>
>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
>>> ---
>>> tools/intel_gpu_top.c | 5 ++++-
>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
>>> index 60ff62d28..66a8effa6 100644
>>> --- a/tools/intel_gpu_top.c
>>> +++ b/tools/intel_gpu_top.c
>>> @@ -828,8 +828,11 @@ static void update_client(struct client *c, unsigned int pid, char *name)
>>> c->last[i] = val[i];
>>> }
>>>
>>> - c->samples++;
>>> + if (!c->total_runtime)
>>> + return;
>>> +
>>> c->status = ALIVE;
>>> + c->samples++;
>>> }
>>>
>>> static void
>>>
>>
>> Not sure we need to do it at this level and not instead at presentation
>> time.
>
> My goal was just presentation :(
Something like this would be presentation time:
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 60ff62d28e5d..f7c5cc3bf19f 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -1942,6 +1942,9 @@ print_client(struct client *c, struct engines
*engines, double t, int lines,
unsigned int i;
if (output_mode == INTERACTIVE) {
+ if (!c->total_runtime) /* make a key toggle? */
+ return;
+
lines++;
printf("%6u %17s ", c->pid, c->print_name);
But it worries me a bit to do it by default.
>
>> Plus, in default sort mode they would be at the end of the list,
>> so behind the more active clients. Or you go into sort by id and they
>> annoy you there?
>
> No. I had a bunch of "Xorg" when launching steam which never became
> anything. So I guess just a bunch of dlopen("libgl") spawing a bunch of
> clients that we never used for anything more than gl[X]GetString, but
> leaked the fd.
But they were at the end, so potentially even cut of if enough
interesting clients? Or you actually sorted by id? Or something else is
broken?
>
> [Why does steam need 10% of the gpu to update an icon on the toolbar
> which is hidden while minimised? Why do games sit in static menus at
> 100% gpu? Why?]
Yep, I have this issue with animated KDE tray icons. :I
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Hide unused clients
2021-02-01 8:36 ` Tvrtko Ursulin
@ 2021-02-01 8:49 ` Chris Wilson
0 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2021-02-01 8:49 UTC (permalink / raw)
To: Tvrtko Ursulin, intel-gfx; +Cc: igt-dev
Quoting Tvrtko Ursulin (2021-02-01 08:36:04)
>
> On 01/02/2021 08:21, Chris Wilson wrote:
> > Quoting Tvrtko Ursulin (2021-02-01 08:14:45)
> >>
> >> On 31/01/2021 03:11, Chris Wilson wrote:
> >>> Keep new clients hidden until they utilise the GPU.
> >>>
> >>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >>> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> >>> ---
> >>> tools/intel_gpu_top.c | 5 ++++-
> >>> 1 file changed, 4 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
> >>> index 60ff62d28..66a8effa6 100644
> >>> --- a/tools/intel_gpu_top.c
> >>> +++ b/tools/intel_gpu_top.c
> >>> @@ -828,8 +828,11 @@ static void update_client(struct client *c, unsigned int pid, char *name)
> >>> c->last[i] = val[i];
> >>> }
> >>>
> >>> - c->samples++;
> >>> + if (!c->total_runtime)
> >>> + return;
> >>> +
> >>> c->status = ALIVE;
> >>> + c->samples++;
> >>> }
> >>>
> >>> static void
> >>>
> >>
> >> Not sure we need to do it at this level and not instead at presentation
> >> time.
> >
> > My goal was just presentation :(
>
> Something like this would be presentation time:
>
> diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
> index 60ff62d28e5d..f7c5cc3bf19f 100644
> --- a/tools/intel_gpu_top.c
> +++ b/tools/intel_gpu_top.c
> @@ -1942,6 +1942,9 @@ print_client(struct client *c, struct engines
> *engines, double t, int lines,
> unsigned int i;
>
> if (output_mode == INTERACTIVE) {
> + if (!c->total_runtime) /* make a key toggle? */
> + return;
> +
> lines++;
>
> printf("%6u %17s ", c->pid, c->print_name);
>
> But it worries me a bit to do it by default.
I was about to argue then remembered top behaves the same (although a
process cannot exist without consuming at least some CPU resources,
whereas a client can never touch the GPU or allocate GPU memory).
But if we are borrow ideas for filtering the view from top... :)
For top, it's 'i' and there's o%CPU>x
> >> Plus, in default sort mode they would be at the end of the list,
> >> so behind the more active clients. Or you go into sort by id and they
> >> annoy you there?
> >
> > No. I had a bunch of "Xorg" when launching steam which never became
> > anything. So I guess just a bunch of dlopen("libgl") spawing a bunch of
> > clients that we never used for anything more than gl[X]GetString, but
> > leaked the fd.
>
> But they were at the end, so potentially even cut of if enough
> interesting clients? Or you actually sorted by id? Or something else is
> broken?
But they were there! Unwanted DRI3 fd, abandoned, left homeless before
being used. Even if they are used, there's still a window where we would
see "Xorg" become "realname" (granted there's still a window as we
sample pidname before totalruntime), it irks me.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Hide unused clients
2021-01-31 3:11 [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Hide unused clients Chris Wilson
2021-02-01 8:14 ` Tvrtko Ursulin
@ 2021-02-01 8:53 ` Chris Wilson
2021-02-01 9:12 ` Tvrtko Ursulin
2021-02-01 9:31 ` [Intel-gfx] [PATCH i-g-t v2] " Chris Wilson
1 sibling, 2 replies; 11+ messages in thread
From: Chris Wilson @ 2021-02-01 8:53 UTC (permalink / raw)
To: intel-gfx; +Cc: Chris Wilson
Hide inactive clients by pressing 'i' (toggle in interactive mode).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
---
tools/intel_gpu_top.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 60ff62d28..edf0dedac 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -1595,6 +1595,7 @@ print_imc(struct engines *engines, double t, int lines, int con_w, int con_h)
}
static bool class_view;
+static bool filter_idle;
static int
print_engines_header(struct engines *engines, double t,
@@ -1689,6 +1690,9 @@ print_engines_footer(struct engines *engines, double t,
pops->close_struct();
if (output_mode == INTERACTIVE) {
+ if (filter_idle && !c->total_runtime)
+ return;
+
if (lines++ < con_h)
printf("\n");
}
@@ -2115,6 +2119,9 @@ static void process_stdin(unsigned int timeout_us)
case 'q':
stop_top = true;
break;
+ case 'i':
+ filter_idle ^= true;
+ break;
case '1':
class_view ^= true;
break;
--
2.30.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Hide unused clients
2021-02-01 8:53 ` Chris Wilson
@ 2021-02-01 9:12 ` Tvrtko Ursulin
2021-02-01 9:31 ` [Intel-gfx] [PATCH i-g-t v2] " Chris Wilson
1 sibling, 0 replies; 11+ messages in thread
From: Tvrtko Ursulin @ 2021-02-01 9:12 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On 01/02/2021 08:53, Chris Wilson wrote:
> Hide inactive clients by pressing 'i' (toggle in interactive mode).
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> ---
> tools/intel_gpu_top.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
> index 60ff62d28..edf0dedac 100644
> --- a/tools/intel_gpu_top.c
> +++ b/tools/intel_gpu_top.c
> @@ -1595,6 +1595,7 @@ print_imc(struct engines *engines, double t, int lines, int con_w, int con_h)
> }
>
> static bool class_view;
> +static bool filter_idle;
>
> static int
> print_engines_header(struct engines *engines, double t,
> @@ -1689,6 +1690,9 @@ print_engines_footer(struct engines *engines, double t,
> pops->close_struct();
>
> if (output_mode == INTERACTIVE) {
> + if (filter_idle && !c->total_runtime)
> + return;
> +
> if (lines++ < con_h)
> printf("\n");
> }
> @@ -2115,6 +2119,9 @@ static void process_stdin(unsigned int timeout_us)
> case 'q':
> stop_top = true;
> break;
> + case 'i':
> + filter_idle ^= true;
> + break;
> case '1':
> class_view ^= true;
> break;
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Intel-gfx] [PATCH i-g-t v2] intel_gpu_top: Hide unused clients
2021-02-01 8:53 ` Chris Wilson
2021-02-01 9:12 ` Tvrtko Ursulin
@ 2021-02-01 9:31 ` Chris Wilson
2021-02-01 9:53 ` Tvrtko Ursulin
1 sibling, 1 reply; 11+ messages in thread
From: Chris Wilson @ 2021-02-01 9:31 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev, Chris Wilson
Hide inactive clients by pressing 'i' (toggle in interactive mode).
v2: Fix location of filter_idle.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
---
tools/intel_gpu_top.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 60ff62d28..d88b6cc61 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -1595,6 +1595,7 @@ print_imc(struct engines *engines, double t, int lines, int con_w, int con_h)
}
static bool class_view;
+static bool filter_idle;
static int
print_engines_header(struct engines *engines, double t,
@@ -2115,6 +2116,9 @@ static void process_stdin(unsigned int timeout_us)
case 'q':
stop_top = true;
break;
+ case 'i':
+ filter_idle ^= true;
+ break;
case '1':
class_view ^= true;
break;
@@ -2323,9 +2327,14 @@ int main(int argc, char **argv)
for_each_client(clients, c, j) {
assert(c->status != PROBE);
+
if (c->status != ALIVE)
break; /* Active clients are first in the array. */
+ /* Active clients before idle */
+ if (filter_idle && !c->total_runtime)
+ break;
+
if (lines >= con_h)
break;
--
2.30.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t v2] intel_gpu_top: Hide unused clients
2021-02-01 9:31 ` [Intel-gfx] [PATCH i-g-t v2] " Chris Wilson
@ 2021-02-01 9:53 ` Tvrtko Ursulin
2021-02-01 9:57 ` [Intel-gfx] [igt-dev] " Chris Wilson
0 siblings, 1 reply; 11+ messages in thread
From: Tvrtko Ursulin @ 2021-02-01 9:53 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: igt-dev
On 01/02/2021 09:31, Chris Wilson wrote:
> Hide inactive clients by pressing 'i' (toggle in interactive mode).
>
> v2: Fix location of filter_idle.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> ---
> tools/intel_gpu_top.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
> index 60ff62d28..d88b6cc61 100644
> --- a/tools/intel_gpu_top.c
> +++ b/tools/intel_gpu_top.c
> @@ -1595,6 +1595,7 @@ print_imc(struct engines *engines, double t, int lines, int con_w, int con_h)
> }
>
> static bool class_view;
> +static bool filter_idle;
>
> static int
> print_engines_header(struct engines *engines, double t,
> @@ -2115,6 +2116,9 @@ static void process_stdin(unsigned int timeout_us)
> case 'q':
> stop_top = true;
> break;
> + case 'i':
> + filter_idle ^= true;
> + break;
> case '1':
> class_view ^= true;
> break;
> @@ -2323,9 +2327,14 @@ int main(int argc, char **argv)
>
> for_each_client(clients, c, j) {
> assert(c->status != PROBE);
> +
> if (c->status != ALIVE)
> break; /* Active clients are first in the array. */
>
> + /* Active clients before idle */
> + if (filter_idle && !c->total_runtime)
> + break;
> +
Break won't be correct for id sort. I don't see what did not work with
v1? It should be effectively the same apart from the break.
Regards,
Tvrtko
> if (lines >= con_h)
> break;
>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Intel-gfx] [igt-dev] [PATCH i-g-t v2] intel_gpu_top: Hide unused clients
2021-02-01 9:53 ` Tvrtko Ursulin
@ 2021-02-01 9:57 ` Chris Wilson
2021-02-01 10:05 ` Tvrtko Ursulin
0 siblings, 1 reply; 11+ messages in thread
From: Chris Wilson @ 2021-02-01 9:57 UTC (permalink / raw)
To: Tvrtko Ursulin, intel-gfx; +Cc: igt-dev
Quoting Tvrtko Ursulin (2021-02-01 09:53:20)
>
> On 01/02/2021 09:31, Chris Wilson wrote:
> > Hide inactive clients by pressing 'i' (toggle in interactive mode).
> >
> > v2: Fix location of filter_idle.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> > Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> > ---
> > tools/intel_gpu_top.c | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
> > index 60ff62d28..d88b6cc61 100644
> > --- a/tools/intel_gpu_top.c
> > +++ b/tools/intel_gpu_top.c
> > @@ -1595,6 +1595,7 @@ print_imc(struct engines *engines, double t, int lines, int con_w, int con_h)
> > }
> >
> > static bool class_view;
> > +static bool filter_idle;
> >
> > static int
> > print_engines_header(struct engines *engines, double t,
> > @@ -2115,6 +2116,9 @@ static void process_stdin(unsigned int timeout_us)
> > case 'q':
> > stop_top = true;
> > break;
> > + case 'i':
> > + filter_idle ^= true;
> > + break;
> > case '1':
> > class_view ^= true;
> > break;
> > @@ -2323,9 +2327,14 @@ int main(int argc, char **argv)
> >
> > for_each_client(clients, c, j) {
> > assert(c->status != PROBE);
> > +
> > if (c->status != ALIVE)
> > break; /* Active clients are first in the array. */
> >
> > + /* Active clients before idle */
> > + if (filter_idle && !c->total_runtime)
> > + break;
> > +
>
> Break won't be correct for id sort. I don't see what did not work with
> v1? It should be effectively the same apart from the break.
We didn't the client to peek into.
Maybe you want to do v3 :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Intel-gfx] [igt-dev] [PATCH i-g-t v2] intel_gpu_top: Hide unused clients
2021-02-01 9:57 ` [Intel-gfx] [igt-dev] " Chris Wilson
@ 2021-02-01 10:05 ` Tvrtko Ursulin
0 siblings, 0 replies; 11+ messages in thread
From: Tvrtko Ursulin @ 2021-02-01 10:05 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: igt-dev
On 01/02/2021 09:57, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2021-02-01 09:53:20)
>>
>> On 01/02/2021 09:31, Chris Wilson wrote:
>>> Hide inactive clients by pressing 'i' (toggle in interactive mode).
>>>
>>> v2: Fix location of filter_idle.
>>>
>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
>>> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
>>> ---
>>> tools/intel_gpu_top.c | 9 +++++++++
>>> 1 file changed, 9 insertions(+)
>>>
>>> diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
>>> index 60ff62d28..d88b6cc61 100644
>>> --- a/tools/intel_gpu_top.c
>>> +++ b/tools/intel_gpu_top.c
>>> @@ -1595,6 +1595,7 @@ print_imc(struct engines *engines, double t, int lines, int con_w, int con_h)
>>> }
>>>
>>> static bool class_view;
>>> +static bool filter_idle;
>>>
>>> static int
>>> print_engines_header(struct engines *engines, double t,
>>> @@ -2115,6 +2116,9 @@ static void process_stdin(unsigned int timeout_us)
>>> case 'q':
>>> stop_top = true;
>>> break;
>>> + case 'i':
>>> + filter_idle ^= true;
>>> + break;
>>> case '1':
>>> class_view ^= true;
>>> break;
>>> @@ -2323,9 +2327,14 @@ int main(int argc, char **argv)
>>>
>>> for_each_client(clients, c, j) {
>>> assert(c->status != PROBE);
>>> +
>>> if (c->status != ALIVE)
>>> break; /* Active clients are first in the array. */
>>>
>>> + /* Active clients before idle */
>>> + if (filter_idle && !c->total_runtime)
>>> + break;
>>> +
>>
>> Break won't be correct for id sort. I don't see what did not work with
>> v1? It should be effectively the same apart from the break.
>
> We didn't the client to peek into.
Ahaha did not spot you put the diff in wrong function. :)
> Maybe you want to do v3 :)
Sure.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-02-01 10:05 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-31 3:11 [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Hide unused clients Chris Wilson
2021-02-01 8:14 ` Tvrtko Ursulin
2021-02-01 8:21 ` Chris Wilson
2021-02-01 8:36 ` Tvrtko Ursulin
2021-02-01 8:49 ` Chris Wilson
2021-02-01 8:53 ` Chris Wilson
2021-02-01 9:12 ` Tvrtko Ursulin
2021-02-01 9:31 ` [Intel-gfx] [PATCH i-g-t v2] " Chris Wilson
2021-02-01 9:53 ` Tvrtko Ursulin
2021-02-01 9:57 ` [Intel-gfx] [igt-dev] " Chris Wilson
2021-02-01 10:05 ` Tvrtko Ursulin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox