kernel/vm: Give VMCaches better names.
This helps with debugging and reading scheduling reports.
This commit is contained in:
@@ -81,7 +81,8 @@ public:
|
|||||||
VMCache();
|
VMCache();
|
||||||
virtual ~VMCache();
|
virtual ~VMCache();
|
||||||
|
|
||||||
status_t Init(uint32 cacheType, uint32 allocationFlags);
|
status_t Init(uint32 cacheType, uint32 allocationFlags,
|
||||||
|
const char* name);
|
||||||
|
|
||||||
virtual void Delete();
|
virtual void Delete();
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@
|
|||||||
status_t
|
status_t
|
||||||
VMVnodeCache::Init(struct vnode* vnode, uint32 allocationFlags)
|
VMVnodeCache::Init(struct vnode* vnode, uint32 allocationFlags)
|
||||||
{
|
{
|
||||||
status_t error = VMCache::Init(CACHE_TYPE_VNODE, allocationFlags);
|
status_t error = VMCache::Init(CACHE_TYPE_VNODE, allocationFlags, "VMVnodeCache");
|
||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
|
|||||||
@@ -463,7 +463,7 @@ VMAnonymousCache::Init(bool canOvercommit, int32 numPrecommittedPages,
|
|||||||
")\n", this, canOvercommit ? "yes" : "no", numPrecommittedPages,
|
")\n", this, canOvercommit ? "yes" : "no", numPrecommittedPages,
|
||||||
numGuardPages);
|
numGuardPages);
|
||||||
|
|
||||||
status_t error = VMCache::Init(CACHE_TYPE_RAM, allocationFlags);
|
status_t error = VMCache::Init(CACHE_TYPE_RAM, allocationFlags, "VMAnonymousCache");
|
||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ VMAnonymousNoSwapCache::Init(bool canOvercommit, int32 numPrecommittedPages,
|
|||||||
TRACE(("VMAnonymousNoSwapCache::Init(canOvercommit = %s, numGuardPages = %ld) "
|
TRACE(("VMAnonymousNoSwapCache::Init(canOvercommit = %s, numGuardPages = %ld) "
|
||||||
"at %p\n", canOvercommit ? "yes" : "no", numGuardPages, store));
|
"at %p\n", canOvercommit ? "yes" : "no", numGuardPages, store));
|
||||||
|
|
||||||
status_t error = VMCache::Init(CACHE_TYPE_RAM, allocationFlags);
|
status_t error = VMCache::Init(CACHE_TYPE_RAM, allocationFlags, "VMAnonymousNoSwapCache");
|
||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
|
|||||||
@@ -630,9 +630,9 @@ VMCache::~VMCache()
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
VMCache::Init(uint32 cacheType, uint32 allocationFlags)
|
VMCache::Init(uint32 cacheType, uint32 allocationFlags, const char* name)
|
||||||
{
|
{
|
||||||
mutex_init(&fLock, "VMCache");
|
mutex_init(&fLock, name);
|
||||||
|
|
||||||
fRefCount = 1;
|
fRefCount = 1;
|
||||||
source = NULL;
|
source = NULL;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ status_t
|
|||||||
VMDeviceCache::Init(addr_t baseAddress, uint32 allocationFlags)
|
VMDeviceCache::Init(addr_t baseAddress, uint32 allocationFlags)
|
||||||
{
|
{
|
||||||
fBaseAddress = baseAddress;
|
fBaseAddress = baseAddress;
|
||||||
return VMCache::Init(CACHE_TYPE_DEVICE, allocationFlags);
|
return VMCache::Init(CACHE_TYPE_DEVICE, allocationFlags, "VMDeviceCache");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
status_t
|
status_t
|
||||||
VMNullCache::Init(uint32 allocationFlags)
|
VMNullCache::Init(uint32 allocationFlags)
|
||||||
{
|
{
|
||||||
return VMCache::Init(CACHE_TYPE_NULL, allocationFlags);
|
return VMCache::Init(CACHE_TYPE_NULL, allocationFlags, "VMNullCache");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user