mbox series

[U-Boot,0/9] log: Support control over the log output format

Message ID 20171228201423.128338-1-sjg@chromium.org
Headers show
Series log: Support control over the log output format | expand

Message

Simon Glass Dec. 28, 2017, 8:14 p.m. UTC
This adds a few more features to the log system:

- 'log format' command to control the log output format
- 'log rec' command to output a log record manually
- log_ret() function to log error-return values

With these we have more control over how log records are output as well
as the ability to log errors more easily.


Simon Glass (9):
  dm: core: Add a function to look up a uclass by name
  log: Add functions to convert IDs to/from names
  log: Add control over log formatting
  log: Update log_console to honour the log format
  log: Add a command to control the log output format
  log: Add a command to output a log record
  log: Add tests for the new log features
  log: Add documentation for commands and formatting
  log: Add a way to log error-return values

 cmd/log.c                         | 82 +++++++++++++++++++++++++++++++++++++++
 common/Kconfig                    | 13 +++++++
 common/log.c                      | 68 ++++++++++++++++++++++++++++++++
 common/log_console.c              | 27 ++++++++++++-
 configs/sandbox_defconfig         |  1 +
 doc/README.log                    | 35 +++++++++++++++++
 drivers/core/uclass.c             | 14 +++++++
 include/asm-generic/global_data.h |  1 +
 include/dm/uclass.h               |  8 ++++
 include/log.h                     | 64 +++++++++++++++++++++++++++++-
 test/dm/core.c                    |  9 +++++
 test/py/tests/test_log.py         | 32 +++++++++++++--
 12 files changed, 348 insertions(+), 6 deletions(-)

Comments

Simon Glass Jan. 18, 2018, 9:40 p.m. UTC | #1
Hi,

On 28 December 2017 at 12:14, Simon Glass <sjg@chromium.org> wrote:
> This adds a few more features to the log system:
>
> - 'log format' command to control the log output format
> - 'log rec' command to output a log record manually
> - log_ret() function to log error-return values
>
> With these we have more control over how log records are output as well
> as the ability to log errors more easily.
>
>
> Simon Glass (9):
>   dm: core: Add a function to look up a uclass by name
>   log: Add functions to convert IDs to/from names
>   log: Add control over log formatting
>   log: Update log_console to honour the log format
>   log: Add a command to control the log output format
>   log: Add a command to output a log record
>   log: Add tests for the new log features
>   log: Add documentation for commands and formatting
>   log: Add a way to log error-return values
>
>  cmd/log.c                         | 82 +++++++++++++++++++++++++++++++++++++++
>  common/Kconfig                    | 13 +++++++
>  common/log.c                      | 68 ++++++++++++++++++++++++++++++++
>  common/log_console.c              | 27 ++++++++++++-
>  configs/sandbox_defconfig         |  1 +
>  doc/README.log                    | 35 +++++++++++++++++
>  drivers/core/uclass.c             | 14 +++++++
>  include/asm-generic/global_data.h |  1 +
>  include/dm/uclass.h               |  8 ++++
>  include/log.h                     | 64 +++++++++++++++++++++++++++++-
>  test/dm/core.c                    |  9 +++++
>  test/py/tests/test_log.py         | 32 +++++++++++++--
>  12 files changed, 348 insertions(+), 6 deletions(-)
>
> --
> 2.15.1.620.gb9897f4670-goog
>

Are there any comments / reviews on this series, please? I'd like to
apply it in this merge window.

Regards,
Simon
Tom Rini Jan. 19, 2018, 4:20 p.m. UTC | #2
On Thu, Jan 18, 2018 at 01:40:51PM -0800, Simon Glass wrote:
> Hi,
> 
> On 28 December 2017 at 12:14, Simon Glass <sjg@chromium.org> wrote:
> > This adds a few more features to the log system:
> >
> > - 'log format' command to control the log output format
> > - 'log rec' command to output a log record manually
> > - log_ret() function to log error-return values
> >
> > With these we have more control over how log records are output as well
> > as the ability to log errors more easily.
> >
> >
> > Simon Glass (9):
> >   dm: core: Add a function to look up a uclass by name
> >   log: Add functions to convert IDs to/from names
> >   log: Add control over log formatting
> >   log: Update log_console to honour the log format
> >   log: Add a command to control the log output format
> >   log: Add a command to output a log record
> >   log: Add tests for the new log features
> >   log: Add documentation for commands and formatting
> >   log: Add a way to log error-return values
> >
> >  cmd/log.c                         | 82 +++++++++++++++++++++++++++++++++++++++
> >  common/Kconfig                    | 13 +++++++
> >  common/log.c                      | 68 ++++++++++++++++++++++++++++++++
> >  common/log_console.c              | 27 ++++++++++++-
> >  configs/sandbox_defconfig         |  1 +
> >  doc/README.log                    | 35 +++++++++++++++++
> >  drivers/core/uclass.c             | 14 +++++++
> >  include/asm-generic/global_data.h |  1 +
> >  include/dm/uclass.h               |  8 ++++
> >  include/log.h                     | 64 +++++++++++++++++++++++++++++-
> >  test/dm/core.c                    |  9 +++++
> >  test/py/tests/test_log.py         | 32 +++++++++++++--
> >  12 files changed, 348 insertions(+), 6 deletions(-)
> 
> Are there any comments / reviews on this series, please? I'd like to
> apply it in this merge window.

What's the size change in the cases where boards can't opt-out?
Simon Glass Jan. 24, 2018, 12:52 p.m. UTC | #3
Hi Tom,
On 19 January 2018 at 09:20, Tom Rini <trini@konsulko.com> wrote:
>
> On Thu, Jan 18, 2018 at 01:40:51PM -0800, Simon Glass wrote:
> > Hi,
> >
> > On 28 December 2017 at 12:14, Simon Glass <sjg@chromium.org> wrote:
> > > This adds a few more features to the log system:
> > >
> > > - 'log format' command to control the log output format
> > > - 'log rec' command to output a log record manually
> > > - log_ret() function to log error-return values
> > >
> > > With these we have more control over how log records are output as well
> > > as the ability to log errors more easily.
> > >
> > >
> > > Simon Glass (9):
> > >   dm: core: Add a function to look up a uclass by name
> > >   log: Add functions to convert IDs to/from names
> > >   log: Add control over log formatting
> > >   log: Update log_console to honour the log format
> > >   log: Add a command to control the log output format
> > >   log: Add a command to output a log record
> > >   log: Add tests for the new log features
> > >   log: Add documentation for commands and formatting
> > >   log: Add a way to log error-return values
> > >
> > >  cmd/log.c                         | 82 +++++++++++++++++++++++++++++++++++++++
> > >  common/Kconfig                    | 13 +++++++
> > >  common/log.c                      | 68 ++++++++++++++++++++++++++++++++
> > >  common/log_console.c              | 27 ++++++++++++-
> > >  configs/sandbox_defconfig         |  1 +
> > >  doc/README.log                    | 35 +++++++++++++++++
> > >  drivers/core/uclass.c             | 14 +++++++
> > >  include/asm-generic/global_data.h |  1 +
> > >  include/dm/uclass.h               |  8 ++++
> > >  include/log.h                     | 64 +++++++++++++++++++++++++++++-
> > >  test/dm/core.c                    |  9 +++++
> > >  test/py/tests/test_log.py         | 32 +++++++++++++--
> > >  12 files changed, 348 insertions(+), 6 deletions(-)
> >
> > Are there any comments / reviews on this series, please? I'd like to
> > apply it in this merge window.
>
> What's the size change in the cases where boards can't opt-out?

There is no size change for boards which don't enable CONFIG_LOG. For
sandbox (which does) the change is:

   sandbox: (for 4/4 boards) all +970.0 data +136.0 rodata +212.0 text +622.0

Regards,
Simon
Tom Rini Jan. 24, 2018, 2:33 p.m. UTC | #4
On Wed, Jan 24, 2018 at 05:52:37AM -0700, Simon Glass wrote:
> Hi Tom,
> On 19 January 2018 at 09:20, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Thu, Jan 18, 2018 at 01:40:51PM -0800, Simon Glass wrote:
> > > Hi,
> > >
> > > On 28 December 2017 at 12:14, Simon Glass <sjg@chromium.org> wrote:
> > > > This adds a few more features to the log system:
> > > >
> > > > - 'log format' command to control the log output format
> > > > - 'log rec' command to output a log record manually
> > > > - log_ret() function to log error-return values
> > > >
> > > > With these we have more control over how log records are output as well
> > > > as the ability to log errors more easily.
> > > >
> > > >
> > > > Simon Glass (9):
> > > >   dm: core: Add a function to look up a uclass by name
> > > >   log: Add functions to convert IDs to/from names
> > > >   log: Add control over log formatting
> > > >   log: Update log_console to honour the log format
> > > >   log: Add a command to control the log output format
> > > >   log: Add a command to output a log record
> > > >   log: Add tests for the new log features
> > > >   log: Add documentation for commands and formatting
> > > >   log: Add a way to log error-return values
> > > >
> > > >  cmd/log.c                         | 82 +++++++++++++++++++++++++++++++++++++++
> > > >  common/Kconfig                    | 13 +++++++
> > > >  common/log.c                      | 68 ++++++++++++++++++++++++++++++++
> > > >  common/log_console.c              | 27 ++++++++++++-
> > > >  configs/sandbox_defconfig         |  1 +
> > > >  doc/README.log                    | 35 +++++++++++++++++
> > > >  drivers/core/uclass.c             | 14 +++++++
> > > >  include/asm-generic/global_data.h |  1 +
> > > >  include/dm/uclass.h               |  8 ++++
> > > >  include/log.h                     | 64 +++++++++++++++++++++++++++++-
> > > >  test/dm/core.c                    |  9 +++++
> > > >  test/py/tests/test_log.py         | 32 +++++++++++++--
> > > >  12 files changed, 348 insertions(+), 6 deletions(-)
> > >
> > > Are there any comments / reviews on this series, please? I'd like to
> > > apply it in this merge window.
> >
> > What's the size change in the cases where boards can't opt-out?
> 
> There is no size change for boards which don't enable CONFIG_LOG. For
> sandbox (which does) the change is:
> 
>    sandbox: (for 4/4 boards) all +970.0 data +136.0 rodata +212.0 text +622.0

OK, that's my main concern taken care of, thanks!