From bb6d33fef898d931dcebb882be259e4ed4d727d8 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Mon, 22 Feb 2016 21:59:07 +0100 Subject: 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. --- include/mach_debug/slab_info.h | 6 ------ kern/slab.c | 7 +------ 2 files changed, 1 insertion(+), 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 */ -- cgit v1.2.3