debug messages: implement dynamic debug
Heavily inspired off linux kernel's dynamic debug: * add a /sys/kernel/debug/dynamic_debug/control file (accessible from linux side in /sys/class/mcos/mcos0/sys/kernel/debug/dynamic_debug/control) * read from file to list debug statements (currently limited to 4k in size) * write to file with '[file foo ][func bar ][line [x][-[y]]] [+-]p' to change values Side effects: * reindented all linker scripts, there is a new __verbose section * added string function strpbrk Change-Id: I36d7707274dcc3ecaf200075a31a2f0f76021059
This commit is contained in:
@@ -26,20 +26,17 @@
|
||||
|
||||
#include <mc_xpmem.h>
|
||||
#include <xpmem.h>
|
||||
#include <debug.h>
|
||||
|
||||
#define XPMEM_CURRENT_VERSION 0x00026003
|
||||
|
||||
//#define DEBUG_PRINT_XPMEM
|
||||
|
||||
#ifdef DEBUG_PRINT_XPMEM
|
||||
#define dkprintf(...) kprintf(__VA_ARGS__)
|
||||
#define ekprintf(...) kprintf(__VA_ARGS__)
|
||||
#define XPMEM_DEBUG(format, a...) kprintf("[%d] %s: "format"\n", cpu_local_var(current)->proc->rgid, __func__, ##a)
|
||||
#else
|
||||
#define dkprintf(...) do { if (0) kprintf(__VA_ARGS__); } while (0)
|
||||
#define ekprintf(...) kprintf(__VA_ARGS__)
|
||||
#define XPMEM_DEBUG(format, a...) do { if (0) kprintf("\n"); } while (0)
|
||||
#undef DDEBUG_DEFAULT
|
||||
#define DDEBUG_DEFAULT DDEBUG_PRINT
|
||||
#endif
|
||||
#define XPMEM_DEBUG(format, a...) dkprintf("[%d] %s: "format"\n", cpu_local_var(current)->proc->rgid, __func__, ##a)
|
||||
|
||||
//#define USE_DBUG_ON
|
||||
|
||||
|
||||
Reference in New Issue
Block a user