[Intel-gfx] [PATCH v5] drm/i915: Add ppgtt create/release trace points
Chris Wilson
chris at chris-wilson.co.uk
Tue Oct 28 09:47:18 CET 2014
On Mon, Oct 27, 2014 at 11:03:26AM +0000, Ceraolo Spurio, Daniele wrote:
> On 10/27/2014 8:49 AM, Chris Wilson wrote:
> >On Fri, Oct 24, 2014 at 04:30:52PM +0100, daniele.ceraolospurio at intel.com wrote:
> >>From: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> >>
> >>These tracepoints are useful for observing the creation and
> >>destruction of Full PPGTTs.
> >>
> >>v4: add DOC information
> >>v5: pull the DOC in drm.tmpl
> >>
> >>Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> >>+TRACE_EVENT(i915_ppgtt_create,
> >>+ TP_PROTO(struct i915_address_space *vm),
> >>+
> >>+ TP_ARGS(vm),
> >>+
> >>+ TP_STRUCT__entry(
> >>+ __field(struct i915_address_space *, vm)
> >>+ __field(u32, dev)
> >>+ __field(int, pid)
> >>+ ),
> >>+
> >>+ TP_fast_assign(
> >>+ __entry->vm = vm;
> >>+ __entry->dev = vm->dev->primary->index;
> >>+ __entry->pid = (int)task_pid_nr(current);
> >
> >This is redundant. Current pid is part of the perf header (iirc at
> >least). Besides which storing the creator pid is useful elsewhere when
> >debugging vm (especially as now vm->pid != file->pid).
> >
>
> You're right, I'll just remove it.
>
> >>+ ),
> >>+
> >>+ TP_printk("dev=%u, task_pid=%d, vm=%p",
> >>+ __entry->dev, __entry->pid, __entry->vm)
> >>+);
> >>+
> >>+TRACE_EVENT(i915_ppgtt_release,
> >>+
> >>+ TP_PROTO(struct i915_address_space *vm),
> >>+
> >>+ TP_ARGS(vm),
> >>+
> >>+ TP_STRUCT__entry(
> >>+ __field(struct i915_address_space *, vm)
> >>+ __field(u32, dev)
> >>+ ),
> >>+
> >>+ TP_fast_assign(
> >>+ __entry->vm = vm;
> >>+ __entry->dev = vm->dev->primary->index;
> >>+ ),
> >>+
> >>+ TP_printk("dev=%u, vm=%p", __entry->dev, __entry->vm)
> >>+);
> >
> >So what about switch_mm (accounting for both execlists/non-execlists)?
>
> I'll add a couple of tracepoints to cover them.
>
> >ppgtt_close is also another important point in the lifetime, and so you
> >also want ppgtt_open for symmetry.
> >-Chris
> >
>
> What do you mean with ppgtt_close and ppgtt_open? I don't see
> anything like that in my local d-i-n tree (pulled this morning).
I was thinking of context open/close. They need tracepoints too. The
issue is that we may hold onto the vm long after the process is closed
so tracing that would be useful.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list