[PATCH v2 9/9] log: call vsnprintf only when it is needed to emit trace

Tom Rini trini at konsulko.com
Sat Jan 16 17:22:16 CET 2021


On Fri, Nov 27, 2020 at 11:20:59AM +0100, Patrick Delaunay wrote:

> Reduce the log overhead when the traces are filtered,
> by moving the vsnprintf call from _log() to log_dispatch().
> 
> This patch avoids the printf treatment when LOG features is
> activated, but trace is filtered, for example when
> MAX_LOG_LEVEL=8 and LOG_DEFAULT_LEVEL=6.
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210116/25c10957/attachment.sig>


More information about the U-Boot mailing list