Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t v2] intel_gpu_top: Hide unused clients
       [not found] <20210201085358.3408367-1-chris@chris-wilson.co.uk>
@ 2021-02-01  9:31 ` Chris Wilson
  2021-02-01  9:53   ` [igt-dev] " Tvrtko Ursulin
  2021-02-01 13:02 ` [igt-dev] ✗ Fi.CI.BUILD: failure for intel_gpu_top: Hide unused clients (rev3) Patchwork
  1 sibling, 1 reply; 5+ 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] 5+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v2] intel_gpu_top: Hide unused clients
  2021-02-01  9:31 ` [Intel-gfx] [PATCH i-g-t v2] intel_gpu_top: Hide unused clients Chris Wilson
@ 2021-02-01  9:53   ` Tvrtko Ursulin
  2021-02-01  9:57     ` [Intel-gfx] " Chris Wilson
  0 siblings, 1 reply; 5+ 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;
>   
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Intel-gfx] [igt-dev] [PATCH i-g-t v2] intel_gpu_top: Hide unused clients
  2021-02-01  9:53   ` [igt-dev] " Tvrtko Ursulin
@ 2021-02-01  9:57     ` Chris Wilson
  2021-02-01 10:05       ` Tvrtko Ursulin
  0 siblings, 1 reply; 5+ 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] 5+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v2] intel_gpu_top: Hide unused clients
  2021-02-01  9:57     ` [Intel-gfx] " Chris Wilson
@ 2021-02-01 10:05       ` Tvrtko Ursulin
  0 siblings, 0 replies; 5+ 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

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [igt-dev] ✗ Fi.CI.BUILD: failure for intel_gpu_top: Hide unused clients (rev3)
       [not found] <20210201085358.3408367-1-chris@chris-wilson.co.uk>
  2021-02-01  9:31 ` [Intel-gfx] [PATCH i-g-t v2] intel_gpu_top: Hide unused clients Chris Wilson
@ 2021-02-01 13:02 ` Patchwork
  1 sibling, 0 replies; 5+ messages in thread
From: Patchwork @ 2021-02-01 13:02 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: igt-dev

== Series Details ==

Series: intel_gpu_top: Hide unused clients (rev3)
URL   : https://patchwork.freedesktop.org/series/86486/
State : failure

== Summary ==

IGT patchset build failed on latest successful build
536e0c2e9a63721596cdf93e996e7469cadfaaae intel_gpu_top: Add option to hide inactive clients

[399/454] Linking target tools/hsw_compute_wrpll.
[400/454] Linking target tools/skl_compute_wrpll.
[401/454] Linking target tools/skl_ddb_allocation.
[402/454] Linking target tools/intel_audio_dump.
[403/454] Linking target tools/intel_backlight.
[404/454] Linking target tools/intel_bios_dumper.
[405/454] Linking target tools/intel_display_crc.
[406/454] Linking target tools/intel_display_poller.
[407/454] Linking target tools/intel_forcewaked.
[408/454] Linking target tools/intel_gpu_frequency.
[409/454] Linking target tools/intel_gtt.
[410/454] Linking target tools/intel_firmware_decode.
[411/454] Linking target tools/intel_gpu_time.
[412/454] Linking target tools/intel_guc_logger.
[413/454] Linking target tools/intel_infoframes.
[414/454] Linking target tools/intel_lid.
[415/454] Linking target tools/intel_opregion_decode.
[416/454] Linking target tools/intel_panel_fitter.
[417/454] Linking target tools/intel_reg_checker.
[418/454] Linking target tools/intel_residency.
[419/454] Linking target tools/intel_stepping.
[420/454] Linking target tools/intel_vbt_decode.
[421/454] Linking target tools/intel_watermark.
[422/454] Linking target tools/dpcd_reg.
[423/454] Linking target tools/intel_gem_info.
[424/454] Linking target tools/intel_gvtg_test.
[425/454] Linking target tools/intel_dump_decode.
[426/454] Linking target tools/lsgpu.
[427/454] Linking target tools/intel_framebuffer_dump.
[428/454] Linking target tools/intel_error_decode.
[429/454] Linking target tools/intel_perf_counters.
[430/454] Linking target tools/intel_dp_compliance.
[431/454] Linking target tools/intel_l3_parity.
[432/454] Compiling C object 'tools/tools@@intel_gpu_top@exe/intel_gpu_top.c.o'.
FAILED: tools/tools@@intel_gpu_top@exe/intel_gpu_top.c.o 
ccache cc -Itools/tools@@intel_gpu_top@exe -Itools -I../tools -I../include/drm-uapi -Ilib -I../lib -I../lib/stubs/syscalls -I. -I../ -I/home/cidrm/kernel_headers/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O2 -g -D_GNU_SOURCE -include config.h -D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement -Wformat=2 -Wimplicit-fallthrough=0 -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wuninitialized -Wunused -Wno-clobbered -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-pointer-arith -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-unused-result -Werror=address -Werror=array-bounds -Werror=implicit -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=nonnull -Werror=pointer-to-int-cast -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=write-strings -fno-builtin-malloc -fno-builtin-calloc -fcommon  -MD -MQ 'tools/tools@@intel_gpu_top@exe/intel_gpu_top.c.o' -MF 'tools/tools@@intel_gpu_top@exe/intel_gpu_top.c.o.d' -o 'tools/tools@@intel_gpu_top@exe/intel_gpu_top.c.o' -c ../tools/intel_gpu_top.c
../tools/intel_gpu_top.c:1937:13: warning: redundant redeclaration of ‘filter_idle’ [-Wredundant-decls]
 static bool filter_idle;
             ^~~~~~~~~~~
../tools/intel_gpu_top.c:1598:13: note: previous declaration of ‘filter_idle’ was here
 static bool filter_idle;
             ^~~~~~~~~~~
../tools/intel_gpu_top.c: In function ‘process_stdin’:
../tools/intel_gpu_top.c:2129:3: error: duplicate case value
   case 'i':
   ^~~~
../tools/intel_gpu_top.c:2123:3: note: previously used here
   case 'i':
   ^~~~
ninja: build stopped: subcommand failed.


_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-01 13:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20210201085358.3408367-1-chris@chris-wilson.co.uk>
2021-02-01  9:31 ` [Intel-gfx] [PATCH i-g-t v2] intel_gpu_top: Hide unused clients Chris Wilson
2021-02-01  9:53   ` [igt-dev] " Tvrtko Ursulin
2021-02-01  9:57     ` [Intel-gfx] " Chris Wilson
2021-02-01 10:05       ` Tvrtko Ursulin
2021-02-01 13:02 ` [igt-dev] ✗ Fi.CI.BUILD: failure for intel_gpu_top: Hide unused clients (rev3) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox