diff --git a/headers/private/kernel/vm/VMCache.h b/headers/private/kernel/vm/VMCache.h index 1d3fbae173..0526ee608d 100644 --- a/headers/private/kernel/vm/VMCache.h +++ b/headers/private/kernel/vm/VMCache.h @@ -81,7 +81,8 @@ public: VMCache(); virtual ~VMCache(); - status_t Init(uint32 cacheType, uint32 allocationFlags); + status_t Init(uint32 cacheType, uint32 allocationFlags, + const char* name); virtual void Delete(); diff --git a/src/system/kernel/cache/vnode_store.cpp b/src/system/kernel/cache/vnode_store.cpp index c1f7472b15..d43726fa2c 100644 --- a/src/system/kernel/cache/vnode_store.cpp +++ b/src/system/kernel/cache/vnode_store.cpp @@ -20,7 +20,7 @@ status_t 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) return error; diff --git a/src/system/kernel/vm/VMAnonymousCache.cpp b/src/system/kernel/vm/VMAnonymousCache.cpp index 0de4a554b4..4b579b1622 100644 --- a/src/system/kernel/vm/VMAnonymousCache.cpp +++ b/src/system/kernel/vm/VMAnonymousCache.cpp @@ -463,7 +463,7 @@ VMAnonymousCache::Init(bool canOvercommit, int32 numPrecommittedPages, ")\n", this, canOvercommit ? "yes" : "no", numPrecommittedPages, numGuardPages); - status_t error = VMCache::Init(CACHE_TYPE_RAM, allocationFlags); + status_t error = VMCache::Init(CACHE_TYPE_RAM, allocationFlags, "VMAnonymousCache"); if (error != B_OK) return error; diff --git a/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp b/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp index 4ad43e28c6..b2b82fb378 100644 --- a/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp +++ b/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp @@ -45,7 +45,7 @@ VMAnonymousNoSwapCache::Init(bool canOvercommit, int32 numPrecommittedPages, TRACE(("VMAnonymousNoSwapCache::Init(canOvercommit = %s, numGuardPages = %ld) " "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) return error; diff --git a/src/system/kernel/vm/VMCache.cpp b/src/system/kernel/vm/VMCache.cpp index 0472f14db2..8485bd15b5 100644 --- a/src/system/kernel/vm/VMCache.cpp +++ b/src/system/kernel/vm/VMCache.cpp @@ -630,9 +630,9 @@ VMCache::~VMCache() 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; source = NULL; diff --git a/src/system/kernel/vm/VMDeviceCache.cpp b/src/system/kernel/vm/VMDeviceCache.cpp index d94bf72d5c..0ecbe8e571 100644 --- a/src/system/kernel/vm/VMDeviceCache.cpp +++ b/src/system/kernel/vm/VMDeviceCache.cpp @@ -16,7 +16,7 @@ status_t VMDeviceCache::Init(addr_t baseAddress, uint32 allocationFlags) { fBaseAddress = baseAddress; - return VMCache::Init(CACHE_TYPE_DEVICE, allocationFlags); + return VMCache::Init(CACHE_TYPE_DEVICE, allocationFlags, "VMDeviceCache"); } diff --git a/src/system/kernel/vm/VMNullCache.cpp b/src/system/kernel/vm/VMNullCache.cpp index c854d4b520..f106285c61 100644 --- a/src/system/kernel/vm/VMNullCache.cpp +++ b/src/system/kernel/vm/VMNullCache.cpp @@ -12,7 +12,7 @@ status_t VMNullCache::Init(uint32 allocationFlags) { - return VMCache::Init(CACHE_TYPE_NULL, allocationFlags); + return VMCache::Init(CACHE_TYPE_NULL, allocationFlags, "VMNullCache"); }