From: Andres Rodriguez Date: Fri, 10 Mar 2017 02:25:52 +0000 (-0500) Subject: drm/amdgpu: use sched_job id instead of pointer for tracing X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f6fd20304a783c5f4706865634998fcb70545706;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu: use sched_job id instead of pointer for tracing Pointers get reallocated and they are hard to read for humans. Use ids instead. Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h index da1fa9838fcb..042a091cc42d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h @@ -102,7 +102,7 @@ TRACE_EVENT(amdgpu_cs_ioctl, TP_ARGS(job), TP_STRUCT__entry( __field(struct amdgpu_device *, adev) - __field(struct amd_sched_job *, sched_job) + __field(uint64_t, sched_job_id) __field(struct amdgpu_ib *, ib) __field(struct dma_fence *, fence) __field(char *, ring_name) @@ -111,14 +111,14 @@ TRACE_EVENT(amdgpu_cs_ioctl, TP_fast_assign( __entry->adev = job->adev; - __entry->sched_job = &job->base; + __entry->sched_job_id = job->base.id; __entry->ib = job->ibs; __entry->fence = &job->base.s_fence->finished; __entry->ring_name = job->ring->name; __entry->num_ibs = job->num_ibs; ), - TP_printk("adev=%p, sched_job=%p, first_ib=%p, sched_fence=%p, ring_name=%s, num_ibs=%u", - __entry->adev, __entry->sched_job, __entry->ib, + TP_printk("adev=%p, sched_job=%llu, first_ib=%p, sched_fence=%p, ring_name=%s, num_ibs=%u", + __entry->adev, __entry->sched_job_id, __entry->ib, __entry->fence, __entry->ring_name, __entry->num_ibs) ); @@ -127,7 +127,7 @@ TRACE_EVENT(amdgpu_sched_run_job, TP_ARGS(job), TP_STRUCT__entry( __field(struct amdgpu_device *, adev) - __field(struct amd_sched_job *, sched_job) + __field(uint64_t, sched_job_id) __field(struct amdgpu_ib *, ib) __field(struct dma_fence *, fence) __string(timeline, job->base.s_fence->finished.ops->get_timeline_name(&job->base.s_fence->finished)) @@ -139,7 +139,7 @@ TRACE_EVENT(amdgpu_sched_run_job, TP_fast_assign( __entry->adev = job->adev; - __entry->sched_job = &job->base; + __entry->sched_job_id = job->base.id; __entry->ib = job->ibs; __entry->fence = &job->base.s_fence->finished; __assign_str(timeline, job->base.s_fence->finished.ops->get_timeline_name(&job->base.s_fence->finished)) @@ -148,8 +148,8 @@ TRACE_EVENT(amdgpu_sched_run_job, __entry->ring_name = job->ring->name; __entry->num_ibs = job->num_ibs; ), - TP_printk("adev=%p, sched_job=%p, first_ib=%p, sched_fence=%p, timeline=%s, context=%u, seqno=%u, ring_name=%s, num_ibs=%u", - __entry->adev, __entry->sched_job, __entry->ib, + TP_printk("adev=%p, sched_job=%llu, first_ib=%p, sched_fence=%p, timeline=%s, context=%u, seqno=%u, ring_name=%s, num_ibs=%u", + __entry->adev, __entry->sched_job_id, __entry->ib, __entry->fence, __get_str(timeline), __entry->context, __entry->seqno, __entry->ring_name, __entry->num_ibs) );