summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
diff options
context:
space:
mode:
authorMichael Brown2016-07-05 11:19:36 +0200
committerMichael Brown2016-07-05 13:34:15 +0200
commit6e1ce52d146fe8197c1b58e2e3b0ebcf9ccda349 (patch)
tree9e7b87b2c3fd99f757ee40fadd0a5146040e0097 /src/include/ipxe
parent[debug] Allow per-object runtime enabling/disabling of debug messages (diff)
downloadipxe-6e1ce52d146fe8197c1b58e2e3b0ebcf9ccda349.tar.gz
ipxe-6e1ce52d146fe8197c1b58e2e3b0ebcf9ccda349.tar.xz
ipxe-6e1ce52d146fe8197c1b58e2e3b0ebcf9ccda349.zip
[debug] Allow debug messages to be initially disabled at runtime
Extend the DEBUG=... syntax to allow debug messages to be compiled in but disabled by default. For example: make bin/undionly.kpxe DEBUG=netdevice:3:1 would compile in the messages as for DEBUG=netdevice:3, but would set the debug level mask so that only the DEBUG=netdevice:1 messages would be displayed. This allows for external code to selectively enable the additional debug messages at runtime, without being overwhelmed by unwanted initial noise. For example, a developer of a new protocol may want to temporarily enable tracing of all packets received: this can be done by building with DEBUG=netdevice:3:1 and using // temporarily enable per-packet messages DBG_ENABLE_OBJECT ( netdevice, DBGLVL_EXTRA ); ... // disable per-packet messages DBG_DISABLE_OBJECT ( netdevice, DBGLVL_EXTRA ); Note that unlike the usual DBG_ENABLE() and DBG_DISABLE() macros, DBG_ENABLE_OBJECT() and DBG_DISABLE_OBJECT() will not be removed via dead code elimination if debugging is disabled in the specified object. In particular, this means that using either of these macros will always result in a symbol reference to the specified object. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
0 files changed, 0 insertions, 0 deletions