Changeset 6536a4a9 in mainline


Ignore:
Timestamp:
2006-12-19T17:07:06Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
deada67
Parents:
c8410ec9
Message:

pretty-print slabs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/slab.c

    rc8410ec9 r6536a4a9  
    797797        ipl = interrupts_disable();
    798798        spinlock_lock(&slab_cache_lock);
    799         printf("slab name\t  Osize\t  Pages\t Obj/pg\t  Slabs\t Cached\tAllocobjs\tCtl\n");
    800         for (cur = slab_cache_list.next;cur!=&slab_cache_list; cur=cur->next) {
     799        printf("slab name        size     pages  obj/pg slabs  cached allocated ctl\n");
     800        printf("---------------- -------- ------ ------ ------ ------ --------- ---\n");
     801       
     802        for (cur = slab_cache_list.next; cur != &slab_cache_list; cur = cur->next) {
    801803                cache = list_get_instance(cur, slab_cache_t, link);
    802                 printf("%s\t%7zd\t%7zd\t%7zd\t%7zd\t%7zd\t%7zd\t\t%s\n", cache->name, cache->size,
    803                        (1 << cache->order), cache->objects,
    804                        atomic_get(&cache->allocated_slabs),
    805                        atomic_get(&cache->cached_objs),
    806                        atomic_get(&cache->allocated_objs),
    807                        cache->flags & SLAB_CACHE_SLINSIDE ? "In" : "Out");
     804               
     805                printf("%-16s %8zd %6zd %6zd %6zd %6zd %9zd %-3s\n", cache->name, cache->size, (1 << cache->order), cache->objects, atomic_get(&cache->allocated_slabs), atomic_get(&cache->cached_objs), atomic_get(&cache->allocated_objs), cache->flags & SLAB_CACHE_SLINSIDE ? "in" : "out");
    808806        }
    809807        spinlock_unlock(&slab_cache_lock);
Note: See TracChangeset for help on using the changeset viewer.