[PATCH 8/8] drm/amdgpu: trace vm hub druing flush as well

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 07.04.2017 um 18:52 schrieb Andres Rodriguez:
>
> s/druing/during in subject
>
> On 2017-04-07 12:11 PM, Christian König wrote:
>> From: Christian König <christian.koenig at amd.com>
>>
>> Trace on which hub we are doing the flush.
>>
>> Signed-off-by: Christian König <christian.koenig at amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 20 ++++++++++++--------
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c    |  2 +-
>>   2 files changed, 13 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
>> index 6032161..f95a386 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
>> @@ -334,21 +334,25 @@ TRACE_EVENT(amdgpu_vm_copy_ptes,
>>   );
>>     TRACE_EVENT(amdgpu_vm_flush,
>> -        TP_PROTO(uint64_t pd_addr, unsigned ring, unsigned id),
>> -        TP_ARGS(pd_addr, ring, id),
>> +        TP_PROTO(struct amdgpu_ring *ring, unsigned vm_id,
>> +             uint64_t pd_addr),
>> +        TP_ARGS(ring, vm_id, pd_addr),
>>           TP_STRUCT__entry(
>> -                 __field(u64, pd_addr)
>>                    __field(u32, ring)
>> -                 __field(u32, id)
>> +                 __field(u32, vm_id)
>> +                 __field(u32, vm_hub)
>> +                 __field(u64, pd_addr)
>>                    ),
>>             TP_fast_assign(
>> +               __entry->ring = ring->idx;
>> +               __entry->vm_id = vm_id;
>> +               __entry->vm_hub = ring->funcs->vmhub;
>>                  __entry->pd_addr = pd_addr;
>> -               __entry->ring = ring;
>> -               __entry->id = id;
>>                  ),
>> -        TP_printk("ring=%u, id=%u, pd_addr=%010Lx",
>> -              __entry->ring, __entry->id, __entry->pd_addr)
>> +        TP_printk("ring=%u, id=%u, hub=%u, pd_addr=%010Lx",
>> +              __entry->ring, __entry->vm_id,
>> +              __entry->vm_hub,__entry->pd_addr)
>
> Can you also include job->base->id in this trace?

No, at least not of hand. VM flushes are meant to be independent of job 
submission.

Christian.

>
> Andres
>>   );
>>     TRACE_EVENT(amdgpu_bo_list_set,
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index 494645e..9017b51 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -621,7 +621,7 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, 
>> struct amdgpu_job *job)
>>           u64 pd_addr = amdgpu_vm_adjust_mc_addr(adev, job->vm_pd_addr);
>>           struct fence *fence;
>>   -        trace_amdgpu_vm_flush(pd_addr, ring->idx, job->vm_id);
>> +        trace_amdgpu_vm_flush(ring, job->vm_id, pd_addr);
>>           amdgpu_ring_emit_vm_flush(ring, job->vm_id, pd_addr);
>>             r = amdgpu_fence_emit(ring, &fence);
>



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux