libffado/config_debug.h.in

47 lines
1.7 KiB
C

/* config_debug.h.in. */
#ifndef CONFIG_DEBUG_H
#define CONFIG_DEBUG_H
// use a RT-safe message buffer for debug output
// useful to disable this when the code aborts/segfaults to
// not lose debug output. should be enabled though.
#define DEBUG_USE_MESSAGE_BUFFER 1
// max message length in the debug messagebuffer
#define DEBUG_MAX_MESSAGE_LENGTH 2048
// number of messages in the debug messagebuffer (power of two)
#define DEBUG_MB_BUFFERS 1024
// use an RT thread for reading out the messagebuffer.
// can reduce the number of buffer xruns, and
// avoids priority inversion issues
#define DEBUG_MESSAGE_BUFFER_REALTIME 1
#define DEBUG_MESSAGE_BUFFER_REALTIME_PRIO 1
// When a write can't get the buffer lock, how many times
// should it retry, and wait how long between retries?
#define DEBUG_MESSAGE_BUFFER_COLLISION_WAIT_NTRIES 2
#define DEBUG_MESSAGE_BUFFER_COLLISION_WAIT_NSEC 50000
// support a debug backlog
// note that this does not influence non-debug builds
#define DEBUG_BACKLOG_SUPPORT 0
// number of messages in the backlog buffer (power of two)
#define DEBUG_BACKLOG_MB_BUFFERS 64
// support backtrace debugging
// note that this does not influence non-debug builds
#define DEBUG_BACKTRACE_SUPPORT 0
// max length of backtrace
#define DEBUG_MAX_BACKTRACE_LENGTH 8
// max amount of function pointers to keep track of
#define DEBUG_MAX_BACKTRACE_FUNCTIONS_SEEN 64
// lock debugging
#define DEBUG_LOCK_COLLISION_TRACING 0
// make this zero to disable the most extreme
// debug logging in the critical sections
#define DEBUG_EXTREME_ENABLE 0
#endif // CONFIG_DEBUG_H