On 3/29/24 05:04, Don Porter wrote:
From: Austin Clements <[email protected]>
The E1000 debug messages are very useful for developing drivers, so
this introduces an E1000_DEBUG environment variable that lets the
debug flags be set without recompiling QEMU.
Signed-off-by: Austin Clements <[email protected]>
[[email protected]: Rebased on top of 2.9.0]
Signed-off-by: Geoffrey Thomas <[email protected]>
Signed-off-by: Don Porter <[email protected]>
...
-/* #define E1000_DEBUG */
-
-#ifdef E1000_DEBUG
enum {
DEBUG_GENERAL, DEBUG_IO, DEBUG_MMIO, DEBUG_INTERRUPT,
DEBUG_RX, DEBUG_TX, DEBUG_MDIC, DEBUG_EEPROM,
DEBUG_UNKNOWN, DEBUG_TXSUM, DEBUG_TXERR, DEBUG_RXERR,
DEBUG_RXFILTER, DEBUG_PHY, DEBUG_NOTYET,
};
+
+static const char *debugnames[] = {
+ "GENERAL", "IO", "MMIO", "INTERRUPT",
+ "RX", "TX", "MDIC", "EEPROM",
+ "UNKNOWN", "TXSUM", "TXERR", "RXERR",
+ "RXFILTER", "PHY", "NOTYET", NULL
+};
#define DBGBIT(x) (1<<DEBUG_##x)
static int debugflags = DBGBIT(TXERR) | DBGBIT(GENERAL);
These should be converted to tracepoints.
See docs/devel/tracing.rst.
r~