[PATCH i-g-t] tools/gputop: Fix engine columns with amdgpu

Tvrtko Ursulin tvrtko.ursulin at igalia.com
Tue Apr 16 15:11:52 UTC 2024


On 16/04/2024 15:56, Lucas De Marchi wrote:
> On Mon, Apr 15, 2024 at 12:29:06PM +0100, Tvrtko Ursulin wrote:
>>
>> On 03/04/2024 21:27, Lucas De Marchi wrote:
>>> On Wed, Apr 03, 2024 at 04:00:57PM +0100, Tvrtko Ursulin wrote:
>>>> From: Tvrtko Ursulin <tvrtko.ursulin at igalia.com>
>>>>
>>>> Amdgpu kernel driver skips output of fdinfo keys for unused engines. 
>>>> That
>>>> is completely legal but corrupts the column formatting in the current
>>>> code.
>>>>
>>>> Fix it by simply treating change in detected engines used by a client
>>>> as trigger to re-emit a new header. This ensures columns are always
>>>
>>> That would be kind of ugly if each client uses a different engine.
>>>
>>> Why not outputing all the engine classes regardless of what the
>>> clients are using?
>>
>> It is a bit ugly but gputop doesn't know what are all the engine 
>> classes - it simply auto-detects them from the ones listed in fdinfo. 
>> To know "all" would need more code to be added. See ->
>>
>>>
>>> Lucas De Marchi
>>>
>>>> correctly aligned, albeit with a cost of potentially duplicating the
>>>> header for the same DRM minor.
>>>>
>>>> This is considered good enough for a reference implementation. The
>>>> alternative would be to add some real per DRM minor state tracking 
>>>> which
>>>> sounds like an overkill, at least until gputop gains a nicer (any) UI.
>>
>> -> this paragraph.
>>
>> Can you live with it for now? Until someone decides to write a nicer 
>> UI for it?
> 
> I think it's ugly to repeat the same header over and over when
> there are different engines used, but I'm also unaffected by this
> change, so fine by me.

Thanks, pushed! And trust me, it is way uglier and unreadable with the 
broken alignment/padding. One day someone will perhaps have time to 
improve the "UI", or maybe not since as you know there are nicer tools.

Regards,

Tvrtko


More information about the igt-dev mailing list