On ti, 2017-05-09 at 15:09 +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursu...@intel.com>
> 
> Track total time requests have been executing on the hardware.
> 
> To make this cheap it is hidden behind a static branch with the
> intention that it is only enabled when there is a consumer
> listening. This means that in the default off case the total
> cost of the tracking is just a few no-op instructions on the
> fast paths.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursu...@intel.com>

<SNIP>

> @@ -309,12 +309,14 @@ execlists_context_status_change(struct 
> drm_i915_gem_request *rq,
>  static inline void
>  execlists_context_schedule_in(struct drm_i915_gem_request *rq)
>  {
> +     intel_engine_context_in(rq->engine);
>       execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_IN);
>  }
>  
>  static inline void
>  execlists_context_schedule_out(struct drm_i915_gem_request *rq)
>  {
> +     intel_engine_context_out(rq->engine);
>       execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT);
>  }

It's the perfect opportunity to actually use the notifier chain and
optimize its "empty" case instead of rolling our own.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to