All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick DELAUNAY <patrick.delaunay@st.com>
To: u-boot@lists.denx.de
Subject: [PATCH 00/33] stm32: enable logging features
Date: Wed, 28 Oct 2020 11:52:40 +0000	[thread overview]
Message-ID: <8a219eb12a6446999545b375827980d8@SFHDAG2NODE3.st.com> (raw)
In-Reply-To: <CAPnjgZ3S8PzSYjJSNJ0HhYk_=jkFR4yryL-qwPZRDM4BDQOwiw@mail.gmail.com>

Hi Simon,

> From: Simon Glass <sjg@chromium.org>
> Sent: lundi 26 octobre 2020 20:23
> 
> Hi Patrick,
> 
> On Thu, 15 Oct 2020 at 09:59, Patrick DELAUNAY <patrick.delaunay@st.com>
> wrote:
> >
> > Hi Simon,
> >
> > > From: Simon Glass <sjg@chromium.org>
> > > Sent: jeudi 15 octobre 2020 17:06
> > >
> > > Hi Patrick,
> > >
> > > On Wed, 14 Oct 2020 at 03:16, Patrick Delaunay
> > > <patrick.delaunay@st.com>
> > > wrote:
> > > >
> > > >
> > > > This patch-set migrates several stm32 drivers to API compatible
> > > > with logging features (use dev_...() or log_...() function) and
> > > > activate the logging features in STM32MP15 boards.
> > > >
> > > > The size of U-Boot increased by 19kB (933026 to 952830 on
> > > > STM32MP157C-EV1 board for basic defconfig) but the boot time don't
> > > > change
> > > drastically.
> > >
> > > >

(...)

> > > > For information even with all trace embbeded in U-Boot but not
> > > > activated, MAX_LOG_LEVEL=8 and LOG_DEFAULT_LEVEL=6
> > > >
> > > > Size increase by 190KB (952830 to 1147918) but boot time is stable
> > > > (1,748s vs 1,696s).
> > >
> > > This seems pretty bad. Is this because of console output, or
> > > something else? I understand the size increase, but not the boot time
> increase.
> >
> > For this last point I just execute STM32MP157C-EV1 boot with a patch
> > in configs/stm32mp15_basic_defconfig
> >
> > +CONFIG_LOGLEVEL=8
> > +CONFIG_LOG_MAX_LEVEL=8
> > +CONFIG_LOG_DEFAULT_LEVEL=6
> > +CONFIG_LOGF_FILE=y
> > +CONFIG_LOGF_LINE=y
> > +CONFIG_LOGF_FUNC=y
> >
> > And execute "bootstage report" after the second boot (the first boot
> > is pertubated by env save)
> >
> > I think the delta is linked to
> > 1/ size of U-Boot (SPL spent more time to load U-Boot)
> >     end of SPL 987,579  => 996,117
> 
> OK.
> 
> >
> > 2/ time to check for each debug trace: because I increase the log level
> >    (gd->default_log_level = 6 < MAX_LOG_LEVEL=8)
> 
> This might be the biggest part. If you look at _log() it always does the vsprintf()
> even if in fact log_dispatch() does not dispatch it to anything.

Yes, log_dispatch / log_passes_filter are called after vsnprintf

> I suspect that could be refactored to move the checking to a separate function,
> and then call it before doing the expensive vsprintf().

Or save va_list, fmt in log_rec and call vsnprintf allow when needed in log_dispatch, just before emit

> >
> > 3/ treatment added in log_console_emit (some printf) and
> >     log_dispatch (processing_msg / gd->loghead)
> 
> Likely this is fast.
> 
> >
> > 4/ lower cache performancy as trace code are pesent in memory even
> >     they are not used
> >
> > Can I do some check/experimentation on my side ?
> 
> Yes, if you can use the bootstage_start() and bootstage_accum() within the _log()
> function to measure the total time take in the run.

Ok, I add it in my TODO list

> Regards,
> Simon

Regards

Patrick

  reply	other threads:[~2020-10-28 11:52 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14  9:16 [PATCH 00/33] stm32: enable logging features Patrick Delaunay
2020-10-14  9:16 ` [PATCH 01/33] arm: stm32mp: migrate trace to log macro Patrick Delaunay
2020-10-21 12:01   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 02/33] arm: stm32mp: migrate cmd_stm32prog " Patrick Delaunay
2020-10-21 12:01   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 03/33] arm: stm32mp: bsec: migrate trace " Patrick Delaunay
2020-10-21 12:01   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 04/33] pinctrl: stm32: " Patrick Delaunay
2020-10-21 12:38   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 05/33] gpio: stm32-gpio: migrate trace to dev and " Patrick Delaunay
2020-10-21 12:24   ` Patrice CHOTARD
2020-10-21 12:29   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 06/33] remoproc: stm32: migrate trace to " Patrick Delaunay
2020-10-21 12:25   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 07/33] ram: " Patrick Delaunay
2020-10-21 12:25   ` [Uboot-stm32] " Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 08/33] ram: stm32mp1: migrate trace to dev or " Patrick Delaunay
2020-10-21 12:25   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 09/33] mmc: stm32_sdmmc2: migrate trace to dev and " Patrick Delaunay
2020-10-15 10:25   ` Peng Fan
2020-10-21 12:26   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 10/33] timer: stm32: migrate trace to " Patrick Delaunay
2020-10-21 12:26   ` [Uboot-stm32] " Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 11/33] hwspinlock: " Patrick Delaunay
2020-10-21 12:26   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 12/33] rtc: " Patrick Delaunay
2020-10-21 12:26   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 13/33] watchdog: stm32mp: migrate trace to dev macro Patrick Delaunay
2020-10-21 12:27   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 14/33] power: regulator: stm32-verfbuf: define LOG_CATEGORY Patrick Delaunay
2020-10-21 12:27   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 15/33] misc: rcc: migrate trace to dev macro Patrick Delaunay
2020-10-21 12:27   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 16/33] misc: rcc: keep the rcc device name for subnode Patrick Delaunay
2020-10-21 12:28   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 17/33] clk: stm32mp1: migrate trace to dev and log macro Patrick Delaunay
2020-10-21 12:28   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 18/33] clk: clk_stm32f: " Patrick Delaunay
2020-10-21 12:32   ` [Uboot-stm32] " Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 19/33] clk: clk_stm32h7: " Patrick Delaunay
2020-10-21 12:32   ` [Uboot-stm32] " Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 20/33] reset: stm32-reset: " Patrick Delaunay
2020-10-21 12:32   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 21/33] mailbox: stm32-ipcc: " Patrick Delaunay
2020-10-21 12:33   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 22/33] i2c: stm32f7_i2c: " Patrick Delaunay
2020-10-21 12:33   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 23/33] phy: stm32-usbphyc: " Patrick Delaunay
2020-10-21 12:33   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 24/33] spi: stm32_spi: " Patrick Delaunay
2020-10-21 12:34   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 25/33] spi: stm32_qspi: " Patrick Delaunay
2020-10-21 12:34   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 26/33] mtd: stm32_fmc2: " Patrick Delaunay
2020-10-21 12:34   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 27/33] memory: stm32-fmc2: " Patrick Delaunay
2020-10-21 12:34   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 28/33] serial: stm32: define LOG_CATEGORY Patrick Delaunay
2020-10-21 12:34   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 29/33] video: stm32_ltdc: migrate trace to dev and log macro Patrick Delaunay
2020-10-21 12:35   ` Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 30/33] video: stm32_dsi: " Patrick Delaunay
2020-10-15  8:50   ` Philippe CORNU
2020-10-14  9:16 ` [PATCH 31/33] board: st: stm32mp1: " Patrick Delaunay
2020-10-21 12:35   ` [Uboot-stm32] " Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 32/33] board: st: common: " Patrick Delaunay
2020-10-21 12:36   ` [Uboot-stm32] " Patrice CHOTARD
2020-10-14  9:16 ` [PATCH 33/33] configs: stm32mp15: enable LOG features Patrick Delaunay
2020-10-21 12:37   ` [Uboot-stm32] " Patrice CHOTARD
2020-10-15 15:05 ` [PATCH 00/33] stm32: enable logging features Simon Glass
2020-10-15 15:59   ` Patrick DELAUNAY
2020-10-26 19:22     ` Simon Glass
2020-10-28 11:52       ` Patrick DELAUNAY [this message]
2020-10-30 18:15         ` Simon Glass
2020-11-06 17:45           ` Patrick DELAUNAY
2020-11-06 18:50             ` 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=8a219eb12a6446999545b375827980d8@SFHDAG2NODE3.st.com \
    --to=patrick.delaunay@st.com \
    --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.