Vladimir Sementsov-Ogievskiy writes: > Current trace system have a drawback: parameters of trace functions > are calculated even if corresponding tracepoint is disabled. Also, it > looks like trace function are not actually inlined by compiler (at > least for me).
> Here is a fix proposal: move from function call to macros. Patch 02 > is an example, of how to reduce extra calculations with help of > patch 01. The tracing functions *were* inlined last time I checked, although things changed quite a lot since then. Not sure that will make a lot of difference in terms of overall performance (needs measuring). As for arguments, each trace event has a define TRACE_{NAME}_ENABLED that you can use for that purpose. If this is not explained in tracing.txt, that is a documentation bug. Thanks, Lluis