[Intel-gfx] [PATCH v5] drm/i915: Add ppgtt create/release trace points

Ceraolo Spurio, Daniele daniele.ceraolospurio at intel.com
Mon Oct 27 12:03:26 CET 2014


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).

Thanks,
Daniele



More information about the Intel-gfx mailing list