Home | History | Annotate | Download | only in disk_cache

Lines Matching refs:entry

11 // an entry. The story so far:
22 // the NO_USE list, then we move to the LOW_USE and only then we evict an entry
126 // This entry is not being used by anybody.
157 void Eviction::UpdateRank(EntryImpl* entry, bool modified) {
159 return UpdateRankV2(entry, modified);
161 rankings_->UpdateRank(entry->rankings(), modified, GetListForEntry(entry));
164 void Eviction::OnOpenEntry(EntryImpl* entry) {
166 return OnOpenEntryV2(entry);
169 void Eviction::OnCreateEntry(EntryImpl* entry) {
171 return OnCreateEntryV2(entry);
173 rankings_->Insert(entry->rankings(), true, GetListForEntry(entry));
176 void Eviction::OnDoomEntry(EntryImpl* entry) {
178 return OnDoomEntryV2(entry);
180 if (entry->LeaveRankingsBehind())
183 rankings_->Remove(entry->rankings(), GetListForEntry(entry), true);
186 void Eviction::OnDestroyEntry(EntryImpl* entry) {
188 return OnDestroyEntryV2(entry);
227 void Eviction::ReportTrimTimes(EntryImpl* entry) {
231 CACHE_UMA(AGE, "TrimAge", 0, entry->GetLastUsed());
241 // This is the first entry that we have to evict, generate some noise.
255 Rankings::List Eviction::GetListForEntry(EntryImpl* entry) {
261 EntryImpl* entry = backend_->GetEnumeratedEntry(node, list);
262 if (!entry) {
267 ReportTrimTimes(entry);
269 entry->DoomImpl();
271 entry->DeleteEntryData(false);
272 EntryStore* info = entry->entry()->Data();
275 rankings_->Remove(entry->rankings(), GetListForEntryV2(entry), true);
277 entry->entry()->Store();
278 rankings_->Insert(entry->rankings(), true, Rankings::DELETED);
281 entry->Release();
330 // This entry is not being used by anybody.
370 void Eviction::UpdateRankV2(EntryImpl* entry, bool modified) {
371 rankings_->UpdateRank(entry->rankings(), modified, GetListForEntryV2(entry));
374 void Eviction::OnOpenEntryV2(EntryImpl* entry) {
375 EntryStore* info = entry->entry()->Data();
380 entry->entry()->set_modified();
384 rankings_->Remove(entry->rankings(), Rankings::NO_USE, true);
385 rankings_->Insert(entry->rankings(), false, Rankings::LOW_USE);
386 entry->entry()->Store();
388 rankings_->Remove(entry->rankings(), Rankings::LOW_USE, true);
389 rankings_->Insert(entry->rankings(), false, Rankings::HIGH_USE);
390 entry->entry()->Store();
395 void Eviction::OnCreateEntryV2(EntryImpl* entry) {
396 EntryStore* info = entry->entry()->Data();
413 entry->entry()->Store();
414 rankings_->Remove(entry->rankings(), Rankings::DELETED, true);
421 rankings_->Insert(entry->rankings(), true, GetListForEntryV2(entry));
424 void Eviction::OnDoomEntryV2(EntryImpl* entry) {
425 EntryStore* info = entry->entry()->Data();
429 if (entry->LeaveRankingsBehind()) {
431 entry->entry()->Store();
435 rankings_->Remove(entry->rankings(), GetListForEntryV2(entry), true);
438 entry->entry()->Store();
439 rankings_->Insert(entry->rankings(), true, Rankings::DELETED);
442 void Eviction::OnDestroyEntryV2(EntryImpl* entry) {
443 if (entry->LeaveRankingsBehind())
446 rankings_->Remove(entry->rankings(), Rankings::DELETED, true);
449 Rankings::List Eviction::GetListForEntryV2(EntryImpl* entry) {
450 EntryStore* info = entry->entry()->Data();
501 EntryImpl* entry = backend_->GetEnumeratedEntry(node, Rankings::DELETED);
502 if (!entry) {
507 bool doomed = (entry->entry()->Data()->state == ENTRY_DOOMED);
508 entry->entry()->Data()->state = ENTRY_DOOMED;
509 entry->DoomImpl();
510 entry->Release();
536 // that this entry