summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2016-02-22 21:59:07 +0100
committerRichard Braun <rbraun@sceen.net>2016-02-22 21:59:07 +0100
commitbb6d33fef898d931dcebb882be259e4ed4d727d8 (patch)
tree6315dbe5b517fb002a18476a68b0585a895e53ce
parent724326b4d590d94ff81eb2e5817cc79a9bade7e4 (diff)
Remove kmem cache flags from the debugging interface
* include/mach_debug/slab_info.h (CACHE_FLAGS_NO_CPU_POOL, CACHE_FLAGS_SLAB_EXTERNAL, CACHE_FLAGS_NO_RECLAIM, CACHE_FLAGS_VERIFY, CACHE_FLAGS_DIRECT): Remove macros. * kern/slab.c (host_slab_info): Pass raw cache flags to caller.
-rw-r--r--include/mach_debug/slab_info.h6
-rw-r--r--kern/slab.c7
2 files changed, 1 insertions, 12 deletions
diff --git a/include/mach_debug/slab_info.h b/include/mach_debug/slab_info.h
index 37dcb8c4..7d12cc18 100644
--- a/include/mach_debug/slab_info.h
+++ b/include/mach_debug/slab_info.h
@@ -36,12 +36,6 @@
#define CACHE_NAME_MAX_LEN 32
-#define CACHE_FLAGS_NO_CPU_POOL 0x01
-#define CACHE_FLAGS_SLAB_EXTERNAL 0x02
-#define CACHE_FLAGS_NO_RECLAIM 0x04
-#define CACHE_FLAGS_VERIFY 0x08
-#define CACHE_FLAGS_DIRECT 0x10
-
typedef struct cache_info {
int flags;
size_t cpu_pool_size;
diff --git a/kern/slab.c b/kern/slab.c
index 41ff01a9..3253af2f 100644
--- a/kern/slab.c
+++ b/kern/slab.c
@@ -1534,12 +1534,7 @@ kern_return_t host_slab_info(host_t host, cache_info_array_t *infop,
list_for_each_entry(&kmem_cache_list, cache, node) {
simple_lock(&cache->lock);
- info[i].flags = ((cache->flags & KMEM_CF_SLAB_EXTERNAL)
- ? CACHE_FLAGS_SLAB_EXTERNAL : 0)
- | ((cache->flags & KMEM_CF_VERIFY)
- ? CACHE_FLAGS_VERIFY : 0)
- | ((cache->flags & KMEM_CF_DIRECTMAP)
- ? CACHE_FLAGS_DIRECT : 0);
+ info[i].flags = cache->flags;
#if SLAB_USE_CPU_POOLS
info[i].cpu_pool_size = cache->cpu_pool_type->array_size;
#else /* SLAB_USE_CPU_POOLS */