[igt-dev] [PATCH i-g-t] intel_gpu_top: Include fresh clients in the hide inactive filter

Chris Wilson chris at chris-wilson.co.uk
Fri Feb 5 14:01:19 UTC 2021


As a new client does not have a delta for its first sample, treat as
still as idle and hide it if the user requests not to be shown clients
with no activity.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
 tools/intel_gpu_top.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 453f39541..21084185d 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -1972,7 +1972,7 @@ print_client(struct client *c, struct engines *engines, double t, int lines,
 	unsigned int i;
 
 	if (output_mode == INTERACTIVE) {
-		if (filter_idle && !c->total_runtime)
+		if (filter_idle && (!c->total_runtime || c->samples < 2))
 			return lines;
 
 		lines++;
-- 
2.30.0



More information about the igt-dev mailing list