From 63f0bf3d50b70f011b9d600a1a4bc1a1c7720654 Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Wed, 4 Apr 2018 16:26:49 +0100 Subject: intel-gpu-top: Rewrite the tool to be safe to use intel-gpu-top is a dangerous tool which can hang machines due unsafe mmio register access. This patch rewrites it to use only PMU. Only overall command streamer busyness and GPU global data such as power and frequencies are included in this new version. For access to more GPU functional unit level data, an OA metric based tool like gpu-top should be used instead. v2: * Sort engines by class and instance. * Do not wait for one sampling period to display something on screen. * Move code out of the asserts. (Rinat Ibragimov) * Continuously adapt to terminal size. (Rinat Ibragimov) v3: * Change layout and precision of some field. (Chris Wilson) Eero Tamminen: * Use more user friendly engine names. * Don't error out if a counter is missing. * Add IMC read/write bandwidth. * Report minimum required kernel version. v4: * Really support 4.16 by skipping of missing engines. * Simpler and less hacky float printing. * Preserve copyright header. (Antonio Argenziano) * Simplify engines_ptr macro. (Rinat Ibragimov) v5: * Get RAPL unit from sysfs. * Consolidate sysfs paths with a macro. * Tidy error handling by carrying over and reporting errno. * Check against console height on all prints. * More readable minimum kernel version message. (Eero Tamminen) * Column banner for per engine stats. (Eero Tamminen) v6: * Man page update. (Eero Tamminen) Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Cc: Lionel Landwerlin Cc: Petri Latvala Cc: Eero Tamminen Cc: Rinat Ibragimov Reviewed-by: Lionel Landwerlin # v1 Reviewed-by: Chris Wilson # v0.5 Reviewed-by: Matthew Auld --- tools/meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools/meson.build') diff --git a/tools/meson.build b/tools/meson.build index 789219d0..8ed1ccf4 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -23,7 +23,6 @@ tools_progs = [ 'intel_gpu_frequency', 'intel_firmware_decode', 'intel_gpu_time', - 'intel_gpu_top', 'intel_gtt', 'intel_guc_logger', 'intel_infoframes', @@ -117,6 +116,11 @@ shared_library('intel_aubdump', 'aubdump.c', name_prefix : '', install : true) +executable('intel_gpu_top', 'intel_gpu_top.c', + install : true, + install_rpath : rpathdir, + dependencies : tool_deps + [ lib_igt_perf ]) + conf_data = configuration_data() conf_data.set('prefix', prefix) conf_data.set('exec_prefix', '${prefix}') -- cgit v1.2.3