2008-10-01 15:56:44 +04:00
|
|
|
#ifndef KERNEL_DEBUG_CONFIG_H
|
|
|
|
#define KERNEL_DEBUG_CONFIG_H
|
|
|
|
|
2008-10-20 18:24:46 +04:00
|
|
|
// Master switch:
|
|
|
|
// 0: Disables all debug code that hasn't been enabled otherwise.
|
|
|
|
// 1: Enables some lightweight debug code.
|
|
|
|
// 2: Enables more debug code. Will impact performance.
|
|
|
|
#define KDEBUG_LEVEL 2
|
|
|
|
|
|
|
|
#define KDEBUG_LEVEL_2 (KDEBUG_LEVEL >= 2)
|
|
|
|
#define KDEBUG_LEVEL_1 (KDEBUG_LEVEL >= 1)
|
|
|
|
#define KDEBUG_LEVEL_0 (KDEBUG_LEVEL >= 0)
|
|
|
|
|
2008-10-01 15:56:44 +04:00
|
|
|
|
|
|
|
// general kernel debugging
|
|
|
|
|
|
|
|
// Enables kernel ASSERT()s and various checks, locking primitives aren't
|
|
|
|
// benaphore-style.
|
2008-10-20 18:24:46 +04:00
|
|
|
#define KDEBUG KDEBUG_LEVEL_2
|
2008-10-01 15:56:44 +04:00
|
|
|
|
2009-06-03 16:28:49 +04:00
|
|
|
// Size of the heap used by the kernel debugger.
|
|
|
|
#define KDEBUG_HEAP (64 * 1024)
|
|
|
|
|
2009-04-16 23:56:11 +04:00
|
|
|
// Set to 0 to disable support for kernel breakpoints.
|
|
|
|
#define KERNEL_BREAKPOINTS 1
|
2008-10-17 01:43:32 +04:00
|
|
|
|
2008-10-01 15:56:44 +04:00
|
|
|
|
2008-10-20 18:24:46 +04:00
|
|
|
// block/file cache
|
2008-10-01 15:56:44 +04:00
|
|
|
|
|
|
|
// Enables debugger commands.
|
2008-10-20 18:24:46 +04:00
|
|
|
#define DEBUG_BLOCK_CACHE KDEBUG_LEVEL_1
|
2008-10-01 15:56:44 +04:00
|
|
|
|
|
|
|
// Enables checks that non-dirty blocks really aren't changed. Seriously
|
|
|
|
// degrades performance when the block cache is used heavily.
|
2008-10-20 18:24:46 +04:00
|
|
|
#define BLOCK_CACHE_DEBUG_CHANGED KDEBUG_LEVEL_2
|
|
|
|
|
|
|
|
// Enables a global list of file maps and related debugger commands.
|
|
|
|
#define DEBUG_FILE_MAP KDEBUG_LEVEL_1
|
|
|
|
|
|
|
|
|
|
|
|
// heap
|
|
|
|
|
|
|
|
// Initialize newly allocated memory with something non zero.
|
|
|
|
#define PARANOID_KERNEL_MALLOC KDEBUG_LEVEL_2
|
|
|
|
|
|
|
|
// Check for double free, and fill freed memory with 0xdeadbeef.
|
|
|
|
#define PARANOID_KERNEL_FREE KDEBUG_LEVEL_2
|
|
|
|
|
|
|
|
// Validate sanity of the heap after each operation (slow!).
|
|
|
|
#define PARANOID_HEAP_VALIDATION 0
|
|
|
|
|
|
|
|
// Store size, thread and team info at the end of each allocation block.
|
|
|
|
// Enables the "allocations*" debugger commands.
|
|
|
|
#define KERNEL_HEAP_LEAK_CHECK 0
|
|
|
|
|
|
|
|
|
|
|
|
// interrupts
|
|
|
|
|
|
|
|
// Adds statistics and unhandled counter per interrupts. Enables the "ints"
|
|
|
|
// debugger command.
|
|
|
|
#define DEBUG_INTERRUPTS KDEBUG_LEVEL_1
|
|
|
|
|
|
|
|
|
|
|
|
// semaphores
|
|
|
|
|
|
|
|
// Enables tracking of the last threads that acquired/released a semaphore.
|
|
|
|
#define DEBUG_SEM_LAST_ACQUIRER KDEBUG_LEVEL_1
|
|
|
|
|
|
|
|
|
|
|
|
// SMP
|
|
|
|
|
|
|
|
// Enables spinlock caller debugging. When acquiring a spinlock twice on a
|
|
|
|
// non-SMP machine, this will give a clue who locked it the first time.
|
|
|
|
// Furthermore (also on SMP machines) the "spinlock" debugger command will be
|
|
|
|
// available.
|
|
|
|
#define DEBUG_SPINLOCKS KDEBUG_LEVEL_2
|
2008-10-01 15:56:44 +04:00
|
|
|
|
|
|
|
|
2008-10-05 17:15:04 +04:00
|
|
|
// VM
|
|
|
|
|
|
|
|
// Enables the vm_page::queue, i.e. it is tracked which queue the page should
|
|
|
|
// be in.
|
2008-10-20 18:24:46 +04:00
|
|
|
#define DEBUG_PAGE_QUEUE 0
|
2008-10-05 17:15:04 +04:00
|
|
|
|
|
|
|
// Enables extra debug fields in the vm_page used to track page transitions
|
|
|
|
// between caches.
|
2008-10-20 18:24:46 +04:00
|
|
|
#define DEBUG_PAGE_CACHE_TRANSITIONS 0
|
2008-10-05 17:15:04 +04:00
|
|
|
|
|
|
|
// Enables a global list of all vm_cache structures.
|
2008-10-20 18:24:46 +04:00
|
|
|
#define DEBUG_CACHE_LIST KDEBUG_LEVEL_1
|
2008-10-05 17:15:04 +04:00
|
|
|
|
|
|
|
// Enables swap support.
|
2008-10-20 18:24:46 +04:00
|
|
|
#define ENABLE_SWAP_SUPPORT 1
|
2008-10-05 17:15:04 +04:00
|
|
|
|
|
|
|
// When set limits the amount of available RAM (in MB).
|
|
|
|
//#define LIMIT_AVAILABLE_MEMORY 256
|
|
|
|
|
|
|
|
|
2008-10-01 15:56:44 +04:00
|
|
|
#endif // KERNEL_DEBUG_CONFIG_H
|