[igt-dev] [PATCH i-g-t v3 14/16] intel_gpu_top: Show gt specific values if requested
Umesh Nerlige Ramappa
umesh.nerlige.ramappa at intel.com
Fri May 19 15:46:48 UTC 2023
On multi-gt platforms, the aggregate values are displayed as default. If
user passes -p (physical) option for these platforms, show gt specific
counter values.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
tools/intel_gpu_top.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 2b867f8dc..6e9b3416c 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -1526,6 +1526,26 @@ print_header(const struct igt_device_card *card,
&power_group,
NULL
};
+ int i;
+
+ /*
+ * If we have multi-gt and the user has specified -p options, show gt
+ * specific values.
+ */
+ if (!class_view && engines->num_gts > 1) {
+ int j = 0;
+
+ groups[j++] = &period_group;
+ for (i = 0; i < engines->num_gts; i++)
+ groups[j++] = &freq_group_gt[i];
+
+ groups[j++] = &irq_group;
+ for (i = 0; i < engines->num_gts; i++)
+ groups[j++] = &rc6_group_gt[i];
+
+ groups[j++] = &power_group;
+ groups[j++] = NULL;
+ }
if (output_mode != JSON)
memmove(&groups[0], &groups[1],
--
2.36.1
More information about the igt-dev
mailing list