aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys/kmem.h
diff options
context:
space:
mode:
authorbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>2008-05-05 20:18:49 +0000
committerbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>2008-05-05 20:18:49 +0000
commit9ab1ac14ad955800ca070abc11dd031244efb65f (patch)
treea90ffa4dc3297ae6c4d918e610a9764bc63672d5 /include/sys/kmem.h
parentbcd68186d8009957b751720a801e4c16bb272e83 (diff)
Commit adaptive mutexes. This seems to have introduced some new
crashes but it's not clear to me yet if these are a problem with the mutex implementation or ZFSs usage of it. Minor taskq fixes to add new tasks to the end of the pending list. Minor enhansements to the debug infrastructure. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@94 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
Diffstat (limited to 'include/sys/kmem.h')
-rw-r--r--include/sys/kmem.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/sys/kmem.h b/include/sys/kmem.h
index 73965c58b..cc56ddd36 100644
--- a/include/sys/kmem.h
+++ b/include/sys/kmem.h
@@ -54,9 +54,9 @@ extern int kmem_warning_flag;
if (unlikely(atomic64_read(&kmem_alloc_used)>kmem_alloc_max)) \
kmem_alloc_max = atomic64_read(&kmem_alloc_used); \
\
- __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_alloc(%d, 0x%x)'d " \
+ __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_alloc(%d, 0x%x) = %p " \
"(%ld/%ld)\n", (int)(size), (int)(flags), \
- atomic64_read(&kmem_alloc_used), \
+ _ptr_, atomic64_read(&kmem_alloc_used), \
kmem_alloc_max); \
} \
\
@@ -70,8 +70,8 @@ extern int kmem_warning_flag;
({ \
ASSERT((ptr) || (size > 0)); \
atomic64_sub((size), &kmem_alloc_used); \
- __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_free(%d)'d (%ld/%ld)\n", \
- (int)(size), atomic64_read(&kmem_alloc_used), \
+ __CDEBUG_LIMIT(S_KMEM, D_INFO, "kmem_free(%p, %d) (%ld/%ld)\n", \
+ (ptr), (int)(size), atomic64_read(&kmem_alloc_used), \
kmem_alloc_max); \
memset(ptr, 0x5a, (size)); /* Poison */ \
kfree(ptr); \
@@ -99,9 +99,9 @@ extern int kmem_warning_flag;
if (unlikely(atomic64_read(&vmem_alloc_used)>vmem_alloc_max)) \
vmem_alloc_max = atomic64_read(&vmem_alloc_used); \
\
- __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_alloc(%d, 0x%x)'d " \
+ __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_alloc(%d, 0x%x) = %p " \
"(%ld/%ld)\n", (int)(size), (int)(flags), \
- atomic64_read(&vmem_alloc_used), \
+ _ptr_, atomic64_read(&vmem_alloc_used), \
vmem_alloc_max); \
} \
\
@@ -116,8 +116,8 @@ extern int kmem_warning_flag;
({ \
ASSERT((ptr) || (size > 0)); \
atomic64_sub((size), &vmem_alloc_used); \
- __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_free(%d)'d (%ld/%ld)\n", \
- (int)(size), atomic64_read(&vmem_alloc_used), \
+ __CDEBUG_LIMIT(S_KMEM, D_INFO, "vmem_free(%p, %d) (%ld/%ld)\n", \
+ (ptr), (int)(size), atomic64_read(&vmem_alloc_used), \
vmem_alloc_max); \
memset(ptr, 0x5a, (size)); /* Poison */ \
vfree(ptr); \