From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mateo Lozano, Oscar" Subject: Re: [PATCH 1/3] drm/i915: Add ppgtt init/release trace points Date: Thu, 19 Jun 2014 14:22:54 +0000 Message-ID: <92648605EABDA246B775AAB04C95A7A301320DBC@IRSMSX103.ger.corp.intel.com> References: <1403108201-6596-1-git-send-email-oscar.mateo@intel.com> <20140619075634.GD10572@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 13F2F6E131 for ; Thu, 19 Jun 2014 07:23:53 -0700 (PDT) In-Reply-To: <20140619075634.GD10572@nuc-i3427.alporthouse.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , "dan.cer.spu@gmail.com" Cc: "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org > -----Original Message----- > From: Chris Wilson [mailto:chris@chris-wilson.co.uk] > Sent: Thursday, June 19, 2014 8:57 AM > To: Mateo Lozano, Oscar > Cc: intel-gfx@lists.freedesktop.org > Subject: Re: [Intel-gfx] [PATCH 1/3] drm/i915: Add ppgtt init/release tra= ce > points > = > On Wed, Jun 18, 2014 at 05:16:39PM +0100, oscar.mateo@intel.com wrote: > > From: Daniele Ceraolo Spurio > > > > These tracepoints are useful for observing the creation and > > destruction of Full PPGTTs. > > > > Signed-off-by: Oscar Mateo > > --- > > 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 =3D > > 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 =3D 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=3D%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 =3D ppgtt; > > + __entry->ppgtt_op_code =3D 0; > > + ), > > + > > + TP_printk("ppgtt op: %u", __entry->ppgtt_op_code) > = > op is redundant and unuseful since it is already encoded into the tracepo= int > itself. I'm not happy with the tracepoint name either, but it is close. N= ote, > that we do like to pretend that our driver can coexist with itself. That = means > we have to pass along the dev->minor here so that listeners can distingui= sh > events between imaginary devices. You need to say which client created the > ppgtt and include some method for identifying the ppgtt. > -Chris Hmmm... I was submitting this on behalf of our validation team but in retro= spect that was a bad idea: it=B4s much better if they participate in the di= scussion. Daniele, care to join? -- Oscar