All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mateo Lozano, Oscar" <oscar.mateo@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	"dan.cer.spu@gmail.com" <dan.cer.spu@gmail.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/3] drm/i915: Add ppgtt init/release trace points
Date: Thu, 19 Jun 2014 14:22:54 +0000	[thread overview]
Message-ID: <92648605EABDA246B775AAB04C95A7A301320DBC@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <20140619075634.GD10572@nuc-i3427.alporthouse.com>

> -----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 trace
> points
> 
> On Wed, Jun 18, 2014 at 05:16:39PM +0100, oscar.mateo@intel.com wrote:
> > From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> >
> > These tracepoints are useful for observing the creation and
> > destruction of Full PPGTTs.
> >
> > Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
> > ---
> >  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)
> 
> op is redundant and unuseful since it is already encoded into the tracepoint
> itself. I'm not happy with the tracepoint name either, but it is close. Note,
> 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 distinguish
> 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 retrospect that was a bad idea: it´s much better if they participate in the discussion. Daniele, care to join?

-- Oscar

  reply	other threads:[~2014-06-19 14:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 16:16 [PATCH 1/3] drm/i915: Add ppgtt init/release trace points oscar.mateo
2014-06-18 16:16 ` [PATCH 2/3] drm/i915: Add ctx param to i915_gem_ring_dispatch trace point oscar.mateo
2014-06-18 16:16 ` [PATCH 3/3] drm/i915: Trace point callbacks for validation oscar.mateo
2014-06-19  7:56 ` [PATCH 1/3] drm/i915: Add ppgtt init/release trace points Chris Wilson
2014-06-19 14:22   ` Mateo Lozano, Oscar [this message]
2014-06-19 15:41     ` Daniele Ceraolo Spurio
2014-06-19 16:05       ` Chris Wilson
2014-07-01 16:24 daniele.ceraolospurio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=92648605EABDA246B775AAB04C95A7A301320DBC@IRSMSX103.ger.corp.intel.com \
    --to=oscar.mateo@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dan.cer.spu@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.