Message ID | 20210201085358.3408367-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [i-g-t] intel_gpu_top: Hide unused clients | expand |
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
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;
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(+)