[PATCH v2 2/2] tools/gputop: toggle sysfs profiling knob if available for device

Lucas De Marchi lucas.demarchi at intel.com
Wed Apr 3 20:46:46 UTC 2024


On Tue, Apr 02, 2024 at 11:27:45PM +0100, Adrián Larumbe wrote:
>For every DRM device that enables its job accounting HW from user space,
>toggle it right before obtaining per-client fdinfo numbers.
>
>Make sure profiling status is returned to its original state before
>exiting, by handling the SIGINT signal just like in intel_gpu_top.

isn't this something that should be rather tracked on the kernel side
rather than relying on the userspace to behave?

1) call gputop
2) call gputop, because you forgot you had it open in another ssh
    session
3) stop (1), because ssh session dies

 From the kernel side, I think it could be done by enabling it on fd
open, disabling it on last close.

Lucas De Marchi


More information about the igt-dev mailing list