All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH 3/3] log: call vsnprintf only when it is needed to emit trace
Date: Wed, 11 Nov 2020 07:32:03 -0700	[thread overview]
Message-ID: <CAPnjgZ1Ne3=cRHyQrdr=v+6u9fcVgxKrrWGnwhecci-+YDB6mw@mail.gmail.com> (raw)
In-Reply-To: <20201106175339.30683-3-patrick.delaunay@st.com>

On Fri, 6 Nov 2020 at 10:55, Patrick Delaunay <patrick.delaunay@st.com> 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.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
>
> # Conflicts:
> #       common/log.c
> ---
>
>  common/log.c | 22 ++++++++++++++--------
>  1 file changed, 14 insertions(+), 8 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

  reply	other threads:[~2020-11-11 14:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06 17:53 [PATCH 1/3] log: don't build the trace buffer when log is not ready Patrick Delaunay
2020-11-06 17:53 ` [PATCH 2/3] log: use debug uart to output trace before LOG init Patrick Delaunay
2020-11-11 14:32   ` Simon Glass
2020-11-19 13:42     ` Patrick DELAUNAY
2020-11-06 17:53 ` [PATCH 3/3] log: call vsnprintf only when it is needed to emit trace Patrick Delaunay
2020-11-11 14:32   ` Simon Glass [this message]
2020-11-11 14:32 ` [PATCH 1/3] log: don't build the trace buffer when log is not ready Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPnjgZ1Ne3=cRHyQrdr=v+6u9fcVgxKrrWGnwhecci-+YDB6mw@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.