* The KDL commands cache/cache_ref will now also print the type of the cache.
* Made the output look a bit more like that of the other commands. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20279 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7ce2eaa1e0
commit
5eb9da355a
@ -2035,6 +2035,25 @@ dump_cache_chain(int argc, char **argv)
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
cache_type_to_string(int32 type)
|
||||
{
|
||||
switch (type) {
|
||||
case CACHE_TYPE_RAM:
|
||||
return "RAM";
|
||||
case CACHE_TYPE_DEVICE:
|
||||
return "device";
|
||||
case CACHE_TYPE_VNODE:
|
||||
return "vnode";
|
||||
case CACHE_TYPE_NULL:
|
||||
return "null";
|
||||
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
dump_cache(int argc, char **argv)
|
||||
{
|
||||
@ -2086,7 +2105,7 @@ dump_cache(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (showCacheRef) {
|
||||
kprintf("cache_ref at %p:\n", cacheRef);
|
||||
kprintf("CACHE_REF %p:\n", cacheRef);
|
||||
if (!showCache)
|
||||
kprintf(" cache: %p\n", cacheRef->cache);
|
||||
kprintf(" ref_count: %ld\n", cacheRef->ref_count);
|
||||
@ -2103,11 +2122,12 @@ dump_cache(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (showCache) {
|
||||
kprintf("cache at %p:\n", cache);
|
||||
kprintf("CACHE %p:\n", cache);
|
||||
if (!showCacheRef)
|
||||
kprintf(" cache_ref: %p\n", cache->ref);
|
||||
kprintf(" source: %p\n", cache->source);
|
||||
kprintf(" store: %p\n", cache->store);
|
||||
kprintf(" type: %s\n", cache_type_to_string(cache->type));
|
||||
kprintf(" virtual_base: 0x%Lx\n", cache->virtual_base);
|
||||
kprintf(" virtual_size: 0x%Lx\n", cache->virtual_size);
|
||||
kprintf(" temporary: %ld\n", cache->temporary);
|
||||
|
Loading…
Reference in New Issue
Block a user