On 3/29/24 05:04, Don Porter wrote:
From: Austin Clements <acleme...@csail.mit.edu>
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 <acleme...@csail.mit.edu>
[geo...@ldpreload.com: Rebased on top of 2.9.0]
Signed-off-by: Geoffrey Thomas <geo...@ldpreload.com>
Signed-off-by: Don Porter <por...@cs.unc.edu>
...
-/* #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~