Skip to content

log: don't build the trace buffer when log is not ready

Patrick Delaunay u-boot 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 0 repliesNew
  2. v13 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Add test for LOGL_FORCE_DEBUG (NEW)
- add test to count the dropped messages (NEW)
- replace printascii by console puts, remove test on CONFIG_DEBUG_UART
- Add test of displayed messages requested before log_init (NEW)
- update gd test in console function puts and putc (cosmetic)
- Record all messages in console, even when dropped (NEW)
- added test for content of dropped messages (NEW)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9test: add LOGL_FORCE_DEBUG flags support in log teststest/log/log_test.c+20 -93 replies
2/9log: don't build the trace buffer when log is not readycommon/log.c+8 -53 replies
2/9log: don't build the trace buffer when log is not ready+0 -00 replies
3/9test: log: add test for dropped messagestest/log/log_test.c+35 -82 replies
4/9log: use console puts to output trace before LOG initcommon/log.c+9 -02 replies
4/9log: use console puts to output trace before LOG init+0 -00 replies
5/9test: add test for dropped trace before log_initarch/sandbox/cpu/start.c test/py/tests/test_log.py+16 -02 replies
6/9console: remove duplicated test on gd valuecommon/console.c+8 -83 replies
7/9console: allow to record console output before readycommon/console.c+8 -82 replies
7/9console: allow to record console output before ready+0 -01 reply
8/9test: log: add test for console output of dropped messagestest/log/log_test.c+8 -02 replies
9/9log: call vsnprintf only when it is needed to emit tracecommon/log.c+13 -71 reply

Reviews trailers per patch

10 of 12 patches have a Reviewed-by or Acked-by.

PatchSimon GlassSean Anderson
1/9R-b R-b
2/9R-b
2/9R-b
3/9R-b
4/9
4/9
5/9R-b
6/9R-b R-b
7/9R-b
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/9] log: don't build the trace buffer when log is not ready

It is the V2 of [1], rebased and with added tests.

To allow test (with console record), I replace the debug uart function used to display the dropped messages printascii() by the console generic function puts().

This function allows to support all the features defined in console.c (as DEBUG_UART, PRE_CONSOLE_BUFFER, CONSOLE_RECORD) without duplicate them (no more nedd to test CONFIG_DEBUG_UART for example).

PS: I don't sure that the added trace added for test in
arch/sandbox/cpu/start.c = "sandbox: starting..."
is not disturbing.
see patch 5 = "test: add test for dropped trace before log_init"

[1] http://patchwork.ozlabs.org/project/uboot/list/?series=212739

Changes in v2:
- Add test for LOGL_FORCE_DEBUG (NEW)
- add test to count the dropped messages (NEW)
- replace printascii by console puts, remove test on CONFIG_DEBUG_UART
- Add test of displayed messages requested before log_init (NEW)
- update gd test in console function puts and putc (cosmetic)
- Record all messages in console, even when dropped (NEW)
- added test for content of dropped messages (NEW)

Patrick Delaunay (9):
test: add LOGL_FORCE_DEBUG flags support in log tests
log: don't build the trace buffer when log is not ready
test: log: add test for dropped messages
log: use console puts to output trace before LOG init
test: add test for dropped trace before log_init
console: remove duplicated test on gd value
console: allow to record console output before ready
test: log: add test for console output of dropped messages
log: call vsnprintf only when it is needed to emit trace

 arch/sandbox/cpu/start.c  |  5 +++
 common/console.c          | 32 ++++++++---------
 common/log.c              | 40 +++++++++++++++------
 test/log/log_test.c       | 76 +++++++++++++++++++++++++++++++--------
 test/py/tests/test_log.py | 11 ++++++
 5 files changed, 122 insertions(+), 42 deletions(-)
Signature · 1 line
2.17.1