commit | c698b998bb6003297f8ce20ba136348446e78278 | [log] [tgz] |
---|---|---|
author | Patrick Delaunay <patrick.delaunay@st.com> | Fri Nov 27 11:20:59 2020 +0100 |
committer | Tom Rini <trini@konsulko.com> | Fri Jan 15 14:36:11 2021 -0500 |
tree | 0d486d0d8fd2ef09c54db486d4e456f59af154a4 | |
parent | 742346f6cc1d7053e95d26c82d235e00dd8c1e40 [diff] |
log: call vsnprintf only when it is needed to emit trace 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@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>