All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org, Chris Wilson <chris@chris-wilson.co.uk>
Subject: [Intel-gfx] [PATCH i-g-t v2] intel_gpu_top: Hide unused clients
Date: Mon,  1 Feb 2021 09:31:23 +0000	[thread overview]
Message-ID: <20210201093123.3481855-1-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20210201085358.3408367-1-chris@chris-wilson.co.uk>

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

  parent reply	other threads:[~2021-02-01  9:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-31  3:11 [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Hide unused clients Chris Wilson
2021-01-31  3:11 ` [igt-dev] " Chris Wilson
2021-01-31  3:46 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-01-31  4:48 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-02-01  8:14 ` [Intel-gfx] [PATCH i-g-t] " Tvrtko Ursulin
2021-02-01  8:14   ` [igt-dev] " Tvrtko Ursulin
2021-02-01  8:21   ` [Intel-gfx] " Chris Wilson
2021-02-01  8:21     ` [igt-dev] " Chris Wilson
2021-02-01  8:36     ` [Intel-gfx] " Tvrtko Ursulin
2021-02-01  8:36       ` [igt-dev] " Tvrtko Ursulin
2021-02-01  8:49       ` [Intel-gfx] " Chris Wilson
2021-02-01  8:49         ` [igt-dev] " Chris Wilson
2021-02-01  8:53 ` [Intel-gfx] " Chris Wilson
2021-02-01  9:12   ` Tvrtko Ursulin
2021-02-01  9:31   ` Chris Wilson [this message]
2021-02-01  9:53     ` [Intel-gfx] [PATCH i-g-t v2] " Tvrtko Ursulin
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 10:05           ` Tvrtko Ursulin
2021-02-01 13:02   ` [igt-dev] ✗ Fi.CI.BUILD: failure for intel_gpu_top: Hide unused clients (rev3) 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=20210201093123.3481855-1-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.