Add some crude debugging support. It leaves alot to be

desired, but it should allow more easy kernel debugging for now.


git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@59 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
behlendo
2008-03-31 20:42:36 +00:00
parent e487ee08fb
commit 8d0f1ee907
9 changed files with 251 additions and 41 deletions
+3 -3
View File
@@ -35,14 +35,14 @@ extern int kmem_warning_flag;
\
/* Marked unlikely because we should never be doing this */ \
if (unlikely((size) > (PAGE_SIZE * 2)) && kmem_warning_flag) \
printk("Warning: kmem_alloc(%d, 0x%x) large alloc at %s:%d " \
printk("spl: Warning kmem_alloc(%d, 0x%x) large alloc at %s:%d " \
"(%ld/%ld)\n", (int)(size), (int)(flags), \
__FILE__, __LINE__, \
atomic64_read(&kmem_alloc_used), kmem_alloc_max); \
\
_ptr_ = (void *)allocator((size), (flags)); \
if (_ptr_ == NULL) { \
printk("Warning: kmem_alloc(%d, 0x%x) failed at %s:%d " \
printk("spl: Warning kmem_alloc(%d, 0x%x) failed at %s:%d " \
"(%ld/%ld)\n", (int)(size), (int)(flags), \
__FILE__, __LINE__, \
atomic64_read(&kmem_alloc_used), kmem_alloc_max); \
@@ -73,7 +73,7 @@ extern int kmem_warning_flag;
\
_ptr_ = (void *)vmalloc((size)); \
if (_ptr_ == NULL) { \
printk("Warning: vmem_alloc(%d, 0x%x) failed at %s:%d " \
printk("spl: Warning vmem_alloc(%d, 0x%x) failed at %s:%d " \
"(%ld/%ld)\n", (int)(size), (int)(flags), \
__FILE__, __LINE__, \
atomic64_read(&vmem_alloc_used), vmem_alloc_max); \