[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200812141755.GA8136@home.goodmis.org>
Date: Wed, 12 Aug 2020 10:17:55 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Christian König
<ckoenig.leichtzumerken@...il.com>
Cc: amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, Shashank.Sharma@....com,
daniel.vetter@...ll.ch, alexander.deucher@....com
Subject: Re: [PATCH] drm/amdgpu: adjust the pid in the grab_id trace point
On Fri, Aug 07, 2020 at 03:36:58PM +0200, Christian König wrote:
> Trace something useful instead of the pid of a kernel thread here.
>
> Signed-off-by: Christian König <christian.koenig@....com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
> index 5da20fc166d9..07f99ef69d91 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
> @@ -228,6 +228,7 @@ TRACE_EVENT(amdgpu_vm_grab_id,
> ),
>
> TP_fast_assign(
> + __entry->ent.pid = vm->task_info.pid;
If the ent.pid is not the pid you are interested in for this trace event, just
add a "pid" field to the trace event and place it there. Do not modify the
generic pid that is recorded, as we would like that to be consistent for all
trace events.
The "ent.pid" turns into "common_pid" in the field, leaving "pid" free to use.
Other trace events (like sched_waking) record a pid field that is not the same
as the pid of the executing task.
The "ent.pid" should always be the pid of the task that executed the event.
-- Steve
> __entry->pasid = vm->pasid;
> __assign_str(ring, ring->name)
> __entry->vmid = job->vmid;
> --
> 2.17.1
Powered by blists - more mailing lists