[PATCH] drm/xe: Trace xe_bo_validate

Rodrigo Vivi rodrigo.vivi at intel.com
Fri Dec 6 14:40:29 UTC 2024


On Tue, Dec 03, 2024 at 08:09:39AM +0100, Thomas Hellström wrote:
> On Mon, 2024-12-02 at 21:21 -0500, Oak Zeng wrote:
> > Add a tracepoint for xe_bo_validate function. I found this is
> > useful during debug issues.
> > 
> > Signed-off-by: Oak Zeng <oak.zeng at intel.com>
> Reviewed-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>

pushed to drm-xe-next

Thanks,
Rodrigo.

> 
> > ---
> >  drivers/gpu/drm/xe/xe_bo.c       | 1 +
> >  drivers/gpu/drm/xe/xe_trace_bo.h | 5 +++++
> >  2 files changed, 6 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
> > index bdac446bf8c06..3448ede2befa6 100644
> > --- a/drivers/gpu/drm/xe/xe_bo.c
> > +++ b/drivers/gpu/drm/xe/xe_bo.c
> > @@ -2004,6 +2004,7 @@ int xe_bo_validate(struct xe_bo *bo, struct
> > xe_vm *vm, bool allow_res_evict)
> >  		ctx.resv = xe_vm_resv(vm);
> >  	}
> >  
> > +	trace_xe_bo_validate(bo);
> >  	return ttm_bo_validate(&bo->ttm, &bo->placement, &ctx);
> >  }
> >  
> > diff --git a/drivers/gpu/drm/xe/xe_trace_bo.h
> > b/drivers/gpu/drm/xe/xe_trace_bo.h
> > index c6d3140542cff..e393a2dd83dbe 100644
> > --- a/drivers/gpu/drm/xe/xe_trace_bo.h
> > +++ b/drivers/gpu/drm/xe/xe_trace_bo.h
> > @@ -53,6 +53,11 @@ DEFINE_EVENT(xe_bo, xe_bo_create,
> >  	     TP_ARGS(bo)
> >  );
> >  
> > +DEFINE_EVENT(xe_bo, xe_bo_validate,
> > +	     TP_PROTO(struct xe_bo *bo),
> > +	     TP_ARGS(bo)
> > +);
> > +
> >  TRACE_EVENT(xe_bo_move,
> >  	    TP_PROTO(struct xe_bo *bo, uint32_t new_placement,
> > uint32_t old_placement,
> >  		     bool move_lacks_source),
> 


More information about the Intel-xe mailing list