All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	igt-dev@lists.freedesktop.org
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 1/2] intel_gpu_top: Show banner messages when cycling sort modes
Date: Wed, 03 Feb 2021 11:47:42 +0000	[thread overview]
Message-ID: <161235286280.6538.17980167968377203664@build.alporthouse.com> (raw)
In-Reply-To: <20210203114456.895974-1-tvrtko.ursulin@linux.intel.com>

Quoting Tvrtko Ursulin (2021-02-03 11:44:55)
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> It is useful to let the user know what is the currently active sort mode.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>  tools/intel_gpu_top.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
> index 584aa21b198a..b409106f3718 100644
> --- a/tools/intel_gpu_top.c
> +++ b/tools/intel_gpu_top.c
> @@ -1479,6 +1479,8 @@ print_header_token(const char *cont, int lines, int con_w, int con_h, int *rem,
>         return lines;
>  }
>  
> +static const char *header_msg;
> +
>  static int
>  print_header(const struct igt_device_card *card,
>              const char *codename,
> @@ -1593,8 +1595,14 @@ print_header(const struct igt_device_card *card,
>                 if (lines++ < con_h)
>                         printf("\n");
>  
> -               if (lines++ < con_h)
> -                       printf("\n");
> +               if (lines++ < con_h) {
> +                       if (header_msg) {
> +                               printf(" >>> %s\n", header_msg);
> +                               header_msg = NULL;

I was just about to ask if we showed it once, then cleared it 1s later.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

> +                       } else {
> +                               printf("\n");
> +                       }
> +               }
>         }
>  
>         return lines;
> @@ -2146,12 +2154,15 @@ static void select_client_sort(void)
>         switch (++client_sort % 3) {
>         case 0:
>                 client_cmp = client_last_cmp;
> +               header_msg = "Sorting clients by current GPU usage.";
>                 break;
>         case 1:
>                 client_cmp = client_total_cmp;
> +               header_msg = "Sorting clients by accummulated GPU usage.";
>                 break;
>         case 2:
>                 client_cmp = client_id_cmp;
> +               header_msg = "Sorting clients by sysfs id.";

Do we care about "sysfs"? Just "Sorting clients by id."?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	igt-dev@lists.freedesktop.org
Cc: Intel-gfx@lists.freedesktop.org,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 1/2] intel_gpu_top: Show banner messages when cycling sort modes
Date: Wed, 03 Feb 2021 11:47:42 +0000	[thread overview]
Message-ID: <161235286280.6538.17980167968377203664@build.alporthouse.com> (raw)
In-Reply-To: <20210203114456.895974-1-tvrtko.ursulin@linux.intel.com>

Quoting Tvrtko Ursulin (2021-02-03 11:44:55)
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> It is useful to let the user know what is the currently active sort mode.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>  tools/intel_gpu_top.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
> index 584aa21b198a..b409106f3718 100644
> --- a/tools/intel_gpu_top.c
> +++ b/tools/intel_gpu_top.c
> @@ -1479,6 +1479,8 @@ print_header_token(const char *cont, int lines, int con_w, int con_h, int *rem,
>         return lines;
>  }
>  
> +static const char *header_msg;
> +
>  static int
>  print_header(const struct igt_device_card *card,
>              const char *codename,
> @@ -1593,8 +1595,14 @@ print_header(const struct igt_device_card *card,
>                 if (lines++ < con_h)
>                         printf("\n");
>  
> -               if (lines++ < con_h)
> -                       printf("\n");
> +               if (lines++ < con_h) {
> +                       if (header_msg) {
> +                               printf(" >>> %s\n", header_msg);
> +                               header_msg = NULL;

I was just about to ask if we showed it once, then cleared it 1s later.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

> +                       } else {
> +                               printf("\n");
> +                       }
> +               }
>         }
>  
>         return lines;
> @@ -2146,12 +2154,15 @@ static void select_client_sort(void)
>         switch (++client_sort % 3) {
>         case 0:
>                 client_cmp = client_last_cmp;
> +               header_msg = "Sorting clients by current GPU usage.";
>                 break;
>         case 1:
>                 client_cmp = client_total_cmp;
> +               header_msg = "Sorting clients by accummulated GPU usage.";
>                 break;
>         case 2:
>                 client_cmp = client_id_cmp;
> +               header_msg = "Sorting clients by sysfs id.";

Do we care about "sysfs"? Just "Sorting clients by id."?
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2021-02-03 11:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 11:44 [Intel-gfx] [PATCH i-g-t 1/2] intel_gpu_top: Show banner messages when cycling sort modes Tvrtko Ursulin
2021-02-03 11:44 ` [igt-dev] " Tvrtko Ursulin
2021-02-03 11:44 ` [Intel-gfx] [PATCH i-g-t 2/2] intel_gpu_top: Add option to sort by PID Tvrtko Ursulin
2021-02-03 11:44   ` [igt-dev] " Tvrtko Ursulin
2021-02-03 11:50   ` [Intel-gfx] " Chris Wilson
2021-02-03 11:50     ` [igt-dev] " Chris Wilson
2021-02-03 11:47 ` Chris Wilson [this message]
2021-02-03 11:47   ` [igt-dev] [PATCH i-g-t 1/2] intel_gpu_top: Show banner messages when cycling sort modes Chris Wilson
2021-02-03 11:49   ` [Intel-gfx] " Tvrtko Ursulin
2021-02-03 11:49     ` Tvrtko Ursulin
2021-02-03 15:01 ` [igt-dev] ✗ Fi.CI.BUILD: failure for series starting with [i-g-t,1/2] " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=161235286280.6538.17980167968377203664@build.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=tvrtko.ursulin@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.