[PATCH v2 1/6] tracing, dma-buf: add a trace_dma_fence_sync_to event

Steven Rostedt rostedt at goodmis.org
Wed Feb 14 15:10:41 UTC 2024


On Wed, 14 Feb 2024 13:00:16 +0100
Christian König <christian.koenig at amd.com> wrote:

> > +DEFINE_EVENT(dma_fence_from, dma_fence_sync_to,  
> 
> For a single event you should probably use TRACE_EVENT() instead of 
> declaring a class. A class is only used if you have multiple events with 
> the same parameters.

FYI, TRACE_EVENT() is actually defined as:

#define TRACE_EVENT(name, proto, args, tstruct, assign, print) \
	DECLARE_EVENT_CLASS(name,			       \
			     PARAMS(proto),		       \
			     PARAMS(args),		       \
			     PARAMS(tstruct),		       \
			     PARAMS(assign),		       \
			     PARAMS(print));		       \
	DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args));

So basically, you could really just declare one TRACE_EVENT() and add
DEFINE_EVENT()s on top of it ;)

I never recommended that because I thought it would be confusing.

-- Steve


More information about the amd-gfx mailing list