aboutsummaryrefslogtreecommitdiffstats
path: root/module/spl/spl-proc.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-12-11 11:20:08 -0800
committerBrian Behlendorf <[email protected]>2009-12-11 11:20:08 -0800
commit242f539a2ea886769a6408192a6a263fb2a45eaf (patch)
tree6f04f84924f4a1ddc77314e85f32267f6e3298e8 /module/spl/spl-proc.c
parentf60a5f5221c594372d96767d9859a334ed0a80a6 (diff)
Add skc_flags and full header to /proc/spl/kmem/slab.
Diffstat (limited to 'module/spl/spl-proc.c')
-rw-r--r--module/spl/spl-proc.c45
1 files changed, 26 insertions, 19 deletions
diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c
index dcd686c9e..6458186ee 100644
--- a/module/spl/spl-proc.c
+++ b/module/spl/spl-proc.c
@@ -581,33 +581,40 @@ proc_dofreemem(struct ctl_table *table, int write, struct file *filp,
static void
slab_seq_show_headers(struct seq_file *f)
{
- seq_printf(f, "%-36s\n", "name");
+ seq_printf(f, "%-36s %-6s - %s %s %s - %s %s %s - "
+ "%s %s %s - %s %s %s\n", "name", "flags",
+ "obj_size", "slab_objs", "slab_size",
+ "slab_fail", "slab_create", "slab_destroy",
+ "slab_total", "slab_alloc", "slab_max",
+ "obj_total", "obj_alloc", "obj_max");
}
static int
slab_seq_show(struct seq_file *f, void *p)
{
- spl_kmem_cache_t *skc = p;
+ spl_kmem_cache_t *skc = p;
- ASSERT(skc->skc_magic == SKC_MAGIC);
+ ASSERT(skc->skc_magic == SKC_MAGIC);
- spin_lock(&skc->skc_lock);
+ spin_lock(&skc->skc_lock);
seq_printf(f, "%-36s ", skc->skc_name);
- seq_printf(f, "%u %u %u - %lu %lu %lu - %lu %lu %lu - %lu %lu %lu\n",
- (unsigned)skc->skc_obj_size,
- (unsigned)skc->skc_slab_objs,
- (unsigned)skc->skc_slab_size,
- (long unsigned)skc->skc_slab_fail,
- (long unsigned)skc->skc_slab_create,
- (long unsigned)skc->skc_slab_destroy,
- (long unsigned)skc->skc_slab_total,
- (long unsigned)skc->skc_slab_alloc,
- (long unsigned)skc->skc_slab_max,
- (long unsigned)skc->skc_obj_total,
- (long unsigned)skc->skc_obj_alloc,
- (long unsigned)skc->skc_obj_max);
-
- spin_unlock(&skc->skc_lock);
+ seq_printf(f, "0x%04lx - %u %u %u - %lu %lu %lu - "
+ "%lu %lu %lu - %lu %lu %lu\n",
+ (long unsigned)skc->skc_flags,
+ (unsigned)skc->skc_obj_size,
+ (unsigned)skc->skc_slab_objs,
+ (unsigned)skc->skc_slab_size,
+ (long unsigned)skc->skc_slab_fail,
+ (long unsigned)skc->skc_slab_create,
+ (long unsigned)skc->skc_slab_destroy,
+ (long unsigned)skc->skc_slab_total,
+ (long unsigned)skc->skc_slab_alloc,
+ (long unsigned)skc->skc_slab_max,
+ (long unsigned)skc->skc_obj_total,
+ (long unsigned)skc->skc_obj_alloc,
+ (long unsigned)skc->skc_obj_max);
+
+ spin_unlock(&skc->skc_lock);
return 0;
}