* The slab_cache command now also dumps the actual slab lists.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35737 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2010-03-03 15:15:49 +00:00
parent 6dacf0502d
commit 88f1263865
1 changed files with 28 additions and 0 deletions

View File

@ -198,6 +198,14 @@ class Reserve : public ObjectCacheTraceEntry {
// #pragma mark - // #pragma mark -
static void
dump_slab(::slab* slab)
{
kprintf(" %p %p %6" B_PRIuSIZE " %6" B_PRIuSIZE " %6" B_PRIuSIZE " %p\n",
slab, slab->pages, slab->size, slab->count, slab->offset, slab->free);
}
static int static int
dump_slabs(int argc, char* argv[]) dump_slabs(int argc, char* argv[])
{ {
@ -244,6 +252,26 @@ dump_cache_info(int argc, char* argv[])
kprintf("resize entry don't wait: %p\n", cache->resize_entry_dont_wait); kprintf("resize entry don't wait: %p\n", cache->resize_entry_dont_wait);
kprintf("resize entry can wait: %p\n", cache->resize_entry_can_wait); kprintf("resize entry can wait: %p\n", cache->resize_entry_can_wait);
kprintf(" slab chunk size used offset free\n");
SlabList::Iterator iterator = cache->empty.GetIterator();
if (iterator.HasNext())
kprintf("empty:\n");
while (::slab* slab = iterator.Next())
dump_slab(slab);
iterator = cache->partial.GetIterator();
if (iterator.HasNext())
kprintf("partial:\n");
while (::slab* slab = iterator.Next())
dump_slab(slab);
iterator = cache->full.GetIterator();
if (iterator.HasNext())
kprintf("full:\n");
while (::slab* slab = iterator.Next())
dump_slab(slab);
if ((cache->flags & CACHE_NO_DEPOT) == 0) { if ((cache->flags & CACHE_NO_DEPOT) == 0) {
kprintf("depot:\n"); kprintf("depot:\n");
dump_object_depot(&cache->depot); dump_object_depot(&cache->depot);