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:
@@ -21,10 +21,7 @@
|
||||
#include <memory.h>
|
||||
#include <page.h>
|
||||
#include <string.h>
|
||||
|
||||
#define dkprintf(...) do { if (0) kprintf(__VA_ARGS__); } while (0)
|
||||
#define ekprintf(...) kprintf(__VA_ARGS__)
|
||||
#define fkprintf(...) kprintf(__VA_ARGS__)
|
||||
#include <debug.h>
|
||||
|
||||
struct zeroobj {
|
||||
struct memobj memobj; /* must be first */
|
||||
@@ -117,7 +114,7 @@ static int alloc_zeroobj(void)
|
||||
page = phys_to_page_insert_hash(phys);
|
||||
|
||||
if (page->mode != PM_NONE) {
|
||||
fkprintf("alloc_zeroobj():"
|
||||
ekprintf("alloc_zeroobj():"
|
||||
"page %p %#lx %d %d %#lx\n",
|
||||
page, page_to_phys(page), page->mode,
|
||||
page->count, page->offset);
|
||||
|
||||
Reference in New Issue
Block a user