mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-06-02 04:04:24 +03:00
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:
+3
-3
@@ -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); \
|
||||
|
||||
Reference in New Issue
Block a user