diff options
Diffstat (limited to 'libs/utils/BlobCache.cpp')
-rw-r--r-- | libs/utils/BlobCache.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libs/utils/BlobCache.cpp b/libs/utils/BlobCache.cpp index 590576a..4039807 100644 --- a/libs/utils/BlobCache.cpp +++ b/libs/utils/BlobCache.cpp @@ -38,23 +38,23 @@ BlobCache::BlobCache(size_t maxKeySize, size_t maxValueSize, size_t maxTotalSize mRandState[1] = (now >> 16) & 0xFFFF; mRandState[2] = (now >> 32) & 0xFFFF; #endif - LOGV("initializing random seed using %lld", now); + ALOGV("initializing random seed using %lld", now); } void BlobCache::set(const void* key, size_t keySize, const void* value, size_t valueSize) { if (mMaxKeySize < keySize) { - LOGV("set: not caching because the key is too large: %d (limit: %d)", + ALOGV("set: not caching because the key is too large: %d (limit: %d)", keySize, mMaxKeySize); return; } if (mMaxValueSize < valueSize) { - LOGV("set: not caching because the value is too large: %d (limit: %d)", + ALOGV("set: not caching because the value is too large: %d (limit: %d)", valueSize, mMaxValueSize); return; } if (mMaxTotalSize < keySize + valueSize) { - LOGV("set: not caching because the combined key/value size is too " + ALOGV("set: not caching because the combined key/value size is too " "large: %d (limit: %d)", keySize + valueSize, mMaxTotalSize); return; } @@ -85,7 +85,7 @@ void BlobCache::set(const void* key, size_t keySize, const void* value, clean(); continue; } else { - LOGV("set: not caching new key/value pair because the " + ALOGV("set: not caching new key/value pair because the " "total cache size limit would be exceeded: %d " "(limit: %d)", keySize + valueSize, mMaxTotalSize); @@ -94,7 +94,7 @@ void BlobCache::set(const void* key, size_t keySize, const void* value, } mCacheEntries.add(CacheEntry(keyBlob, valueBlob)); mTotalSize = newTotalSize; - LOGV("set: created new cache entry with %d byte key and %d byte value", + ALOGV("set: created new cache entry with %d byte key and %d byte value", keySize, valueSize); } else { // Update the existing cache entry. @@ -107,7 +107,7 @@ void BlobCache::set(const void* key, size_t keySize, const void* value, clean(); continue; } else { - LOGV("set: not caching new value because the total cache " + ALOGV("set: not caching new value because the total cache " "size limit would be exceeded: %d (limit: %d)", keySize + valueSize, mMaxTotalSize); break; @@ -115,7 +115,7 @@ void BlobCache::set(const void* key, size_t keySize, const void* value, } mCacheEntries.editItemAt(index).setValue(valueBlob); mTotalSize = newTotalSize; - LOGV("set: updated existing cache entry with %d byte key and %d byte " + ALOGV("set: updated existing cache entry with %d byte key and %d byte " "value", keySize, valueSize); } break; @@ -125,7 +125,7 @@ void BlobCache::set(const void* key, size_t keySize, const void* value, size_t BlobCache::get(const void* key, size_t keySize, void* value, size_t valueSize) { if (mMaxKeySize < keySize) { - LOGV("get: not searching because the key is too large: %d (limit %d)", + ALOGV("get: not searching because the key is too large: %d (limit %d)", keySize, mMaxKeySize); return 0; } @@ -134,7 +134,7 @@ size_t BlobCache::get(const void* key, size_t keySize, void* value, CacheEntry dummyEntry(dummyKey, NULL); ssize_t index = mCacheEntries.indexOf(dummyEntry); if (index < 0) { - LOGV("get: no cache entry found for key of size %d", keySize); + ALOGV("get: no cache entry found for key of size %d", keySize); return 0; } @@ -143,10 +143,10 @@ size_t BlobCache::get(const void* key, size_t keySize, void* value, sp<Blob> valueBlob(mCacheEntries[index].getValue()); size_t valueBlobSize = valueBlob->getSize(); if (valueBlobSize <= valueSize) { - LOGV("get: copying %d bytes to caller's buffer", valueBlobSize); + ALOGV("get: copying %d bytes to caller's buffer", valueBlobSize); memcpy(value, valueBlob->getData(), valueBlobSize); } else { - LOGV("get: caller's buffer is too small for value: %d (needs %d)", + ALOGV("get: caller's buffer is too small for value: %d (needs %d)", valueSize, valueBlobSize); } return valueBlobSize; |