qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] hw/arm: Remove printf() calls
@ 2025-02-27 17:01 Peter Maydell
  2025-02-27 17:01 ` [PATCH 1/5] hw/arm/omap1: Convert raw printfs to qemu_log_mask() Peter Maydell
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Peter Maydell @ 2025-02-27 17:01 UTC (permalink / raw)
  To: qemu-arm, qemu-devel

I noticed while looking at the sx1 functional tests that
the omap1 device emulation code prints to stdout
"omap_clkm_write: clocking scheme set to synchronous scalable"
which the test dutifully captures to its default.log.

Printing this kind of debug or information message to stdout
is definitely not something we do any more; so seeing it
prompted me to clean this up for hw/arm:
 * printf()s for guest errors or unimplemented functionality
   should be qemu_log_mask()
 * printf()s for minor informational things should be
   tracepoints
 * printf() for debug that have been ifdeffed out forever
   could in theory be tracepoints, but I didn't feel it
   worth the effort of conversion in this case: I doubt that
   anybody will be trying to debug this code or that the
   specific handful of debug ifdefs would be what they'll want
   anyway. If anybody ever does need to do debug here, they can
   add the tracepoints that are actually useful to them.

thanks
-- PMM

Peter Maydell (5):
  hw/arm/omap1: Convert raw printfs to qemu_log_mask()
  hw/arm/omap1: Drop ALMDEBUG ifdeffed out code
  hw/arm/omap1: Convert information printfs to tracepoints
  hw/arm/omap_sx1.c: Remove ifdeffed out debug printf
  hw/arm/versatilepb: Convert printfs to LOG_GUEST_ERROR

 hw/arm/omap1.c       | 126 ++++++++++++++++---------------------------
 hw/arm/omap_sx1.c    |   4 --
 hw/arm/versatilepb.c |   7 ++-
 hw/arm/trace-events  |   7 +++
 4 files changed, 57 insertions(+), 87 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2025-03-03 13:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-27 17:01 [PATCH 0/5] hw/arm: Remove printf() calls Peter Maydell
2025-02-27 17:01 ` [PATCH 1/5] hw/arm/omap1: Convert raw printfs to qemu_log_mask() Peter Maydell
2025-02-27 22:15   ` Philippe Mathieu-Daudé
2025-02-27 17:01 ` [PATCH 2/5] hw/arm/omap1: Drop ALMDEBUG ifdeffed out code Peter Maydell
2025-02-27 22:15   ` Philippe Mathieu-Daudé
2025-02-27 17:01 ` [PATCH 3/5] hw/arm/omap1: Convert information printfs to tracepoints Peter Maydell
2025-02-27 22:17   ` Philippe Mathieu-Daudé
2025-02-27 17:01 ` [PATCH 4/5] hw/arm/omap_sx1.c: Remove ifdeffed out debug printf Peter Maydell
2025-02-27 17:01 ` [PATCH 5/5] hw/arm/versatilepb: Convert printfs to LOG_GUEST_ERROR Peter Maydell
2025-02-27 22:18   ` Philippe Mathieu-Daudé
2025-02-27 17:49 ` [PATCH 0/5] hw/arm: Remove printf() calls Richard Henderson
2025-03-03 13:05 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).