All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 00/13] log: Add a new logging feature
@ 2017-09-16 21:23 Simon Glass
  2017-09-16 21:23 ` [U-Boot] [PATCH 01/13] Revert "sandbox: remove os_putc() and os_puts()" Simon Glass
                   ` (14 more replies)
  0 siblings, 15 replies; 52+ messages in thread
From: Simon Glass @ 2017-09-16 21:23 UTC (permalink / raw)
  To: u-boot

U-Boot currently has fairly rudimentary logging features. A basic printf()
provides console output and debug() provides debug output which is
activated if DEBUG is defined in the file containing the debug()
statements.

It would be useful to have a few more features:

- control of debug output at runtime, so  problems can potentially be
debugged without recompiling U-Boot
- control of which subsystems output debug information, so that (for
example) it is possible to enable debugging for MMC or SATA at runtime
- indication of severity with each message, so that the user can control
whether just errors are displayed, warnings, or all debug messages
- sending logging information to different destinations, such as console,
memory, linux, etc,

At present U-Boot has a logbuffer feature which records output in a memory
buffer for later display or storage. This is useful but is not at present
enabled for any board.

This series introduced a new logging system which supports:
- various log levels from panic to debug
- log categories including all uclasses and a few others
- log drivers to which all log records can be sent
- log filters which control which log records make it to which drivers

Enabling logging with the default options does not add much to code size.
By default the maximum recorded log level is LOGL_INFO, meaning that debug
messages (and above) are discarded a build-time. Increasing this level
provides more run-time flexibility to enable/disable logging at the cost
of increased code size.

This feature is by no means finished. The README provides a long list of
features and clean-ups that could be done. But hopefully this is a
starting point for improving this important area in U-Boot.

The series is available at u-boot-dm/log-working


Simon Glass (13):
  Revert "sandbox: remove os_putc() and os_puts()"
  Revert "sandbox: Drop special case console code for sandbox"
  Move debug and logging support to a separate header
  mtdparts: Correct use of debug()
  Drop the log buffer
  log: Add an implemention of logging
  log: Add a console driver
  log: Add a 'log level' command
  log: Add a test command
  log: Plumb logging into the init sequence
  log: sandbox: Enable logging
  log: test: Add a pytest for logging
  log: Add documentation

 MAINTAINERS                       |   9 ++
 arch/sandbox/cpu/os.c             |  11 ++
 cmd/Kconfig                       |   8 +
 cmd/Makefile                      |   2 +-
 cmd/log.c                         | 326 +++++---------------------------------
 cmd/mtdparts.c                    |   3 -
 common/Kconfig                    |  86 ++++++++++
 common/Makefile                   |   2 +
 common/board_f.c                  |  23 +--
 common/board_r.c                  |  27 +---
 common/console.c                  |   7 +
 common/image.c                    |   9 --
 common/log.c                      | 247 +++++++++++++++++++++++++++++
 common/log_console.c              |  23 +++
 common/stdio.c                    |   6 -
 configs/sandbox_defconfig         |   5 +-
 doc/README.log                    | 220 +++++++++++++++++++++++++
 include/asm-generic/global_data.h |   8 +-
 include/common.h                  |  64 +-------
 include/log.h                     | 311 ++++++++++++++++++++++++++++++++++++
 include/logbuff.h                 |  49 ------
 include/os.h                      |  20 +++
 include/post.h                    |   4 +-
 post/post.c                       |   9 --
 post/tests.c                      |   4 -
 scripts/config_whitelist.txt      |   1 -
 test/Makefile                     |   1 +
 test/log/Makefile                 |   7 +
 test/log/log_test.c               | 204 ++++++++++++++++++++++++
 test/py/tests/test_log.py         | 106 +++++++++++++
 30 files changed, 1322 insertions(+), 480 deletions(-)
 create mode 100644 common/log.c
 create mode 100644 common/log_console.c
 create mode 100644 doc/README.log
 create mode 100644 include/log.h
 delete mode 100644 include/logbuff.h
 create mode 100644 test/log/Makefile
 create mode 100644 test/log/log_test.c
 create mode 100644 test/py/tests/test_log.py

-- 
2.14.1.690.gbb1197296e-goog

^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2017-09-28 12:39 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-16 21:23 [U-Boot] [PATCH 00/13] log: Add a new logging feature Simon Glass
2017-09-16 21:23 ` [U-Boot] [PATCH 01/13] Revert "sandbox: remove os_putc() and os_puts()" Simon Glass
2017-09-17 12:48   ` Bin Meng
2017-09-17 17:55     ` Simon Glass
2017-09-16 21:23 ` [U-Boot] [PATCH 02/13] Revert "sandbox: Drop special case console code for sandbox" Simon Glass
2017-09-17 12:50   ` Bin Meng
2017-09-17 17:55     ` Simon Glass
2017-09-16 21:23 ` [U-Boot] [PATCH 03/13] Move debug and logging support to a separate header Simon Glass
2017-09-17 12:52   ` Bin Meng
2017-09-16 21:23 ` [U-Boot] [PATCH 04/13] mtdparts: Correct use of debug() Simon Glass
2017-09-17 12:54   ` Bin Meng
2017-09-16 21:23 ` [U-Boot] [PATCH 05/13] Drop the log buffer Simon Glass
2017-09-17 12:58   ` Bin Meng
2017-09-16 21:23 ` [U-Boot] [PATCH 06/13] log: Add an implemention of logging Simon Glass
2017-09-18  3:45   ` Bin Meng
2017-09-20 13:50     ` Simon Glass
2017-09-20 14:41       ` Bin Meng
2017-09-20 14:51         ` Dr. Philipp Tomsich
2017-09-21  4:58         ` Simon Glass
2017-09-22 13:37           ` Bin Meng
2017-09-25  2:14             ` Simon Glass
2017-09-20  2:51   ` Masahiro Yamada
2017-09-20 13:49     ` Simon Glass
2017-09-20 14:37       ` Dr. Philipp Tomsich
2017-09-20 17:34         ` Masahiro Yamada
2017-09-20 17:51           ` Dr. Philipp Tomsich
2017-09-27 16:19             ` Masahiro Yamada
2017-09-20 17:19       ` Masahiro Yamada
2017-09-26 19:10         ` Simon Glass
2017-09-27 17:11           ` Masahiro Yamada
2017-09-28 12:39             ` Simon Glass
2017-09-16 21:23 ` [U-Boot] [PATCH 07/13] log: Add a console driver Simon Glass
2017-09-18  3:45   ` Bin Meng
2017-09-26 19:10     ` Simon Glass
2017-09-16 21:23 ` [U-Boot] [PATCH 08/13] log: Add a 'log level' command Simon Glass
2017-09-18  3:46   ` Bin Meng
2017-09-16 21:23 ` [U-Boot] [PATCH 09/13] log: Add a test command Simon Glass
2017-09-18  3:47   ` Bin Meng
2017-09-16 21:23 ` [U-Boot] [PATCH 10/13] log: Plumb logging into the init sequence Simon Glass
2017-09-18  3:47   ` Bin Meng
2017-09-16 21:23 ` [U-Boot] [PATCH 11/13] log: sandbox: Enable logging Simon Glass
2017-09-18  3:47   ` Bin Meng
2017-09-16 21:23 ` [U-Boot] [PATCH 12/13] log: test: Add a pytest for logging Simon Glass
2017-09-16 21:23 ` [U-Boot] [PATCH 13/13] log: Add documentation Simon Glass
2017-09-18  3:47   ` Bin Meng
2017-09-20  3:04   ` Masahiro Yamada
2017-09-20 13:49     ` Simon Glass
2017-09-20  2:32 ` [U-Boot] [PATCH 00/13] log: Add a new logging feature Masahiro Yamada
2017-09-20 20:20   ` Heinrich Schuchardt
2017-09-21  4:58     ` Simon Glass
2017-09-20 19:55 ` Wolfgang Denk
2017-09-21  4:58   ` Simon Glass

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.