From d4be3ff6232ed7efab0672ae12c4c7a38236894a Mon Sep 17 00:00:00 2001 From: rwatson Date: Thu, 26 Oct 2006 12:55:32 +0000 Subject: Better align output of "show uma" by moving from displaying the basic counters of allocs/frees/use for each zone to the same statistics shown by userspace "vmstat -z". MFC after: 3 days --- sys/vm/uma_core.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sys/vm') diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 14f9974..3e8bb2e 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1,7 +1,7 @@ /*- * Copyright (c) 2002, 2003, 2004, 2005 Jeffrey Roberson * Copyright (c) 2004, 2005 Bosko Milekic - * Copyright (c) 2004-2005 Robert N. M. Watson + * Copyright (c) 2004-2006 Robert N. M. Watson * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -2972,8 +2972,8 @@ DB_SHOW_COMMAND(uma, db_show_uma) uma_zone_t z; int cachefree; - db_printf("%18s %12s %12s %12s %8s\n", "Zone", "Allocs", "Frees", - "Used", "Cache"); + db_printf("%18s %8s %8s %8s %12s\n", "Zone", "Size", "Used", "Free", + "Requests"); LIST_FOREACH(kz, &uma_kegs, uk_link) { LIST_FOREACH(z, &kz->uk_zones, uz_link) { if (kz->uk_flags & UMA_ZFLAG_INTERNAL) { @@ -2988,8 +2988,10 @@ DB_SHOW_COMMAND(uma, db_show_uma) cachefree += kz->uk_free; LIST_FOREACH(bucket, &z->uz_full_bucket, ub_link) cachefree += bucket->ub_cnt; - db_printf("%18s %12ju %12ju %12ju %8d\n", z->uz_name, - allocs, frees, allocs - frees, cachefree); + db_printf("%18s %8ju %8jd %8d %12ju\n", z->uz_name, + (uintmax_t)kz->uk_size, + (intmax_t)(allocs - frees), cachefree, + (uintmax_t)allocs); } } } -- cgit v1.1