[Intel-gfx] [RFC 7/8] drm/i915/tracepoints: Add backend level request in and out tracepoints

Chris Wilson chris at chris-wilson.co.uk
Fri Jan 27 12:27:14 UTC 2017


On Fri, Jan 27, 2017 at 12:01:26PM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> Two new tracepoints placed at the call sites where requests are
> actually passed to the GPU enable userspace to track engine
> utilisation.
> 
> These tracepoints are only enabled when the
> DRM_I915_LOW_LEVEL_TRACEPOINTS Kconfig option is enabled.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_guc_submission.c |  2 ++
>  drivers/gpu/drm/i915/i915_trace.h          | 49 ++++++++++++++++++++++++++++++
>  drivers/gpu/drm/i915/intel_lrc.c           |  4 +++
>  3 files changed, 55 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
> index 8ced9e26f075..beec88a30347 100644
> --- a/drivers/gpu/drm/i915/i915_guc_submission.c
> +++ b/drivers/gpu/drm/i915/i915_guc_submission.c
> @@ -518,6 +518,8 @@ static void __i915_guc_submit(struct drm_i915_gem_request *rq)
>  	if (i915_vma_is_map_and_fenceable(rq->ring->vma))
>  		POSTING_READ_FW(GUC_STATUS);
>  
> +	trace_i915_gem_request_in(rq, 0);

But how to get out for guc? We could do a similar in for ringbuffer.
The original way I used it was in == dispatch, out == ring-notify, which
is why trace_i915_gem_ring_dispatch enabled the signaling.

Hmm. Following on from that we can add the out tracepoint as a
fence-callback. For the moment, I'd drop guc/legacy
trace_i915_gem_request_in and we will try something more magical. Though
once we do enable the fake GuC scheduler we will have an appropriate
place to drop an trace_i915_gem_request_out. Just leaving ringbuffer as
the odd one out, but for who arguably the in/out logic is not as
important.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list