[Intel-gfx] [PATCH v5] drm/i915: Add ppgtt create/release trace points
Chris Wilson
chris at chris-wilson.co.uk
Mon Oct 27 09:49:31 CET 2014
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).
> + ),
> +
> + 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)?
ppgtt_close is also another important point in the lifetime, and so you
also want ppgtt_open for symmetry.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list