On Tue, 26 Feb 2019 08:19:56 -0800 Ira Weiny <ira.weiny@xxxxxxxxx> wrote: > > Instead of: > > > > + create_mad_addr_info(wr, qp_info, > > + &__entry->dlid, &__entry->sl, > > + &__entry->pkey, &__entry->rqpn, > > + &__entry->rqkey); > > > > You do: > > > > create_mad_addr_info(wr, qp_info, __entry); > > > > And then in that function you assign the values directly to the structure. > > Is there any reason this is preferred over what I did? I'm not seeing the > benefit? > Matters if gcc optimizes it into a static inline (which you may not want, because that goes directly into the code that calls the trace points, for each event in that class. Thus, I believe it is a true function call. In which, it is passing 7 arguments, on x86, that requires storing on the stack, and takes time to set up and tear down. Passing the function pointer directly, makes it only use 3 arguments (all in registers) and is much faster, especially, if this is a fast path). Do a disassemble of both approaches to see what I mean. -- Steve