From: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx> These tracepoints are useful for observing the creation and destruction of Full PPGTTs. Signed-off-by: Oscar Mateo <oscar.mateo@xxxxxxxxx> --- drivers/gpu/drm/i915/i915_gem_context.c | 5 +++++ drivers/gpu/drm/i915/i915_trace.h | 38 +++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 5a62a19..bdfe3f5 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -136,6 +136,8 @@ static void ppgtt_release(struct kref *kref) struct i915_hw_ppgtt *ppgtt = container_of(kref, struct i915_hw_ppgtt, ref); + trace_ppgtt_release(ppgtt); + do_ppgtt_cleanup(ppgtt); kfree(ppgtt); } @@ -215,6 +217,9 @@ create_vm_for_ctx(struct drm_device *dev, struct intel_context *ctx) } ppgtt->ctx = ctx; + + trace_ppgtt_init(ppgtt); + return ppgtt; } diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h index f5aa006..2d206d8 100644 --- a/drivers/gpu/drm/i915/i915_trace.h +++ b/drivers/gpu/drm/i915/i915_trace.h @@ -587,6 +587,44 @@ TRACE_EVENT(intel_gpu_freq_change, TP_printk("new_freq=%u", __entry->freq) ); +TRACE_EVENT(ppgtt_init, + + TP_PROTO(struct i915_hw_ppgtt *ppgtt), + + TP_ARGS(ppgtt), + + TP_STRUCT__entry( + __field(struct i915_hw_ppgtt*, trace_ppgtt) + __field(unsigned int, ppgtt_op_code) + ), + + TP_fast_assign( + __entry->trace_ppgtt = ppgtt; + __entry->ppgtt_op_code = 0; + ), + + TP_printk("ppgtt op: %u", __entry->ppgtt_op_code) +); + +TRACE_EVENT(ppgtt_release, + + TP_PROTO(struct i915_hw_ppgtt *ppgtt), + + TP_ARGS(ppgtt), + + TP_STRUCT__entry( + __field(struct i915_hw_ppgtt*, trace_ppgtt) + __field(unsigned int, ppgtt_op_code) + ), + + TP_fast_assign( + __entry->trace_ppgtt = ppgtt; + __entry->ppgtt_op_code = 1; + ), + + TP_printk("ppgtt op: %u", __entry->ppgtt_op_code) +); + #endif /* _I915_TRACE_H_ */ /* This part must be outside protection */ -- 1.9.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx