Lines Matching refs:entryHash

151                 uint32_t entryHash = static_cast<uint32_t>(strtoul(entry->d_name, nullptr, 10));  in MultifileBlobCache()  local
153 ALOGV("INIT: Checking entry %u", entryHash); in MultifileBlobCache()
164 ALOGE("INIT: Entry %u has invalid stats! Removing.", entryHash); in MultifileBlobCache()
192 ALOGE("INIT: Entry %u has bad magic (%u)! Removing.", entryHash, header.magic); in MultifileBlobCache()
220 ALOGV("INIT: Entry %u failed CRC check! Removing.", entryHash); in MultifileBlobCache()
231 entryHash, header.keySize, header.valueSize); in MultifileBlobCache()
239 ALOGV("INIT: Entry %u is good, tracking it now.", entryHash); in MultifileBlobCache()
242 trackEntry(entryHash, header.valueSize, fileSize, st.st_atime); in MultifileBlobCache()
251 fd, mappedEntry, entryHash); in MultifileBlobCache()
254 if (!addToHotCache(entryHash, fd, mappedEntry, fileSize)) { in MultifileBlobCache()
255 ALOGE("INIT Failed to add %u to hot cache", entryHash); in MultifileBlobCache()
319 uint32_t entryHash = android::JenkinsHashMixBytes(0, static_cast<const uint8_t*>(key), keySize); in set() local
329 ALOGV("SET: Add %u to cache", entryHash); in set()
343 std::string fullPath = mMultifileDirName + "/" + std::to_string(entryHash); in set()
346 trackEntry(entryHash, valueSize, fileSize, time(0)); in set()
352 ALOGV("SET: Adding %u to hot cache.", entryHash); in set()
355 if (!addToHotCache(entryHash, -1, buffer, fileSize)) { in set()
356 ALOGE("SET: Failed to add %u to hot cache", entryHash); in set()
366 mDeferredWrites.insert(std::make_pair(entryHash, buffer)); in set()
372 task.initWriteToDisk(entryHash, fullPath, buffer, fileSize); in set()
391 uint32_t entryHash = android::JenkinsHashMixBytes(0, static_cast<const uint8_t*>(key), keySize); in get() local
394 if (!contains(entryHash)) { in get()
395 ALOGV("GET: Cache MISS - cache does not contain entry: %u", entryHash); in get()
400 MultifileEntryStats entryStats = getEntryStats(entryHash); in get()
406 valueSize, entryHash, cachedValueSize); in get()
411 ALOGV("GET: Cache HIT - cache contains entry: %u", entryHash); in get()
422 std::string fullPath = mMultifileDirName + "/" + std::to_string(entryHash); in get()
428 if (mHotCache.find(entryHash) != mHotCache.end()) { in get()
429 ALOGV("GET: HotCache HIT for entry %u", entryHash); in get()
430 cacheEntry = mHotCache[entryHash].entryBuffer; in get()
432 ALOGV("GET: HotCache MISS for entry: %u", entryHash); in get()
439 wait = mDeferredWrites.find(entryHash) != mDeferredWrites.end(); in get()
443 ALOGV("GET: Waiting for write to complete for %u", entryHash); in get()
467 ALOGV("GET: Adding %u to hot cache", entryHash); in get()
468 if (!addToHotCache(entryHash, fd, cacheEntry, fileSize)) { in get()
469 ALOGE("GET: Failed to add %u to hot cache", entryHash); in get()
473 cacheEntry = mHotCache[entryHash].entryBuffer; in get()
482 removeFromHotCache(entryHash); in get()
491 removeFromHotCache(entryHash); in get()
513 uint32_t entryHash = hotCacheIter->first; in finish() local
516 ALOGV("FINISH: Closing hot cache entry for %u", entryHash); in finish()
629 void MultifileBlobCache::trackEntry(uint32_t entryHash, EGLsizeiANDROID valueSize, size_t fileSize, in trackEntry() argument
631 mEntries.insert(entryHash); in trackEntry()
632 mEntryStats[entryHash] = {valueSize, fileSize, accessTime}; in trackEntry()
639 MultifileEntryStats MultifileBlobCache::getEntryStats(uint32_t entryHash) { in getEntryStats() argument
640 return mEntryStats[entryHash]; in getEntryStats()
697 bool MultifileBlobCache::removeFromHotCache(uint32_t entryHash) { in removeFromHotCache() argument
698 if (mHotCache.find(entryHash) != mHotCache.end()) { in removeFromHotCache()
699 ALOGV("HOTCACHE(REMOVE): Removing %u from hot cache", entryHash); in removeFromHotCache()
702 ALOGV("HOTCACHE(REMOVE): Waiting for work to complete for %u", entryHash); in removeFromHotCache()
705 ALOGV("HOTCACHE(REMOVE): Closing hot cache entry for %u", entryHash); in removeFromHotCache()
706 MultifileHotCache entry = mHotCache[entryHash]; in removeFromHotCache()
711 mHotCache.erase(entryHash); in removeFromHotCache()
722 uint32_t entryHash = cacheEntryIter->first; in applyLRU() local
724 ALOGV("LRU: Removing entryHash %u", entryHash); in applyLRU()
727 MultifileEntryStats entryStats = getEntryStats(entryHash); in applyLRU()
731 removeFromHotCache(entryHash); in applyLRU()
734 std::string entryPath = mMultifileDirName + "/" + std::to_string(entryHash); in applyLRU()
744 size_t count = mEntryStats.erase(entryHash); in applyLRU()
746 ALOGE("LRU: Failed to remove entryHash (%u) from mEntryStats", entryHash); in applyLRU()
826 uint32_t entryHash = task.getEntryHash(); in processTask() local
862 std::pair<entryIter, entryIter> iterPair = mDeferredWrites.equal_range(entryHash); in processTask()