Hi,
On 07.12.2015 09:25, Holger Freyther wrote:
On 07 Dec 2015, at 09:12, Harald Welte laforge@gnumonks.org wrote:
- vfprintf() and friends, from logp() statements. The sad part is that
calls like gsm_lchan_name() are of course executed beefore the call into logp(), at which point the vfprintf/sprintf/... for arguments has already been executed, and only the last/final one hasn't happened yet.
Jacob has proposed (and I think maybe included) a patch to check if logging is enabled for any target before making the call (and passing the arguments)
This is contained in the "log: Add log_check_level function" series of patches posted on Nov 17. In first tests it hast reduced the process load by 10-20% (relative to PCU load).
Jacob