intel_gpu_top fails assertion if not run as root
Bisected to commit c67825ba:
commit c67825ba40de18280b34ccb8dd9a71abbefcd61a
Author: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Date: Fri May 19 08:46:42 2023 -0700
intel_gpu_top: Determine number of tiles
Find out how many tiles are present in the platforms for multi-tile support.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
If run as a regular user, instead of getting this error
mattst88@framework igt-gpu-tools % ./build/tools/intel_gpu_top
Failed to initialize PMU! (Permission denied)
When running as a normal user CAP_PERFMON is required to access performance
monitoring. See "man 7 capabilities", "man 8 setcap", or contact your
distribution vendor for assistance.
More information can be found at 'Perf events and tool security' document:
https://www.kernel.org/doc/html/latest/admin-guide/perf-security.html
you get an assertion failure:
mattst88@framework igt-gpu-tools % ./build/tools/intel_gpu_top
intel_gpu_top: ../tools/intel_gpu_top.c:556: get_num_gts: Assertion `!errno || errno == ENOENT' failed.
zsh: IOT instruction (core dumped) ./build/tools/intel_gpu_top