qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/1] e1000: Get debug flags from an environment variable


From: Richard Henderson
Subject: Re: [PATCH 1/1] e1000: Get debug flags from an environment variable
Date: Fri, 29 Mar 2024 07:46:22 -1000
User-agent: Mozilla Thunderbird

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]