Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Unified Diff: net/disk_cache/entry_impl.cc

Issue 182023: Disk Cache: Function re-ordering. No code change. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/disk_cache/mem_entry_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/entry_impl.cc
===================================================================
--- net/disk_cache/entry_impl.cc (revision 24829)
+++ net/disk_cache/entry_impl.cc (working copy)
@@ -384,6 +384,8 @@
return sparse_->GetAvailableRange(offset, len, start);
}
+// ------------------------------------------------------------------------
+
uint32 EntryImpl::GetHash() {
return entry_.Data()->hash;
}
@@ -575,6 +577,31 @@
node_.set_modified();
}
+void EntryImpl::ReportIOTime(Operation op, const base::Time& start) {
+ int group = backend_->GetSizeGroup();
+ switch (op) {
+ case kRead:
+ CACHE_UMA(AGE_MS, "ReadTime", group, start);
+ break;
+ case kWrite:
+ CACHE_UMA(AGE_MS, "WriteTime", group, start);
+ break;
+ case kSparseRead:
+ CACHE_UMA(AGE_MS, "SparseReadTime", 0, start);
+ break;
+ case kSparseWrite:
+ CACHE_UMA(AGE_MS, "SparseWriteTime", 0, start);
+ break;
+ case kAsyncIO:
+ CACHE_UMA(AGE_MS, "AsyncIOTime", group, start);
+ break;
+ default:
+ NOTREACHED();
+ }
+}
+
+// ------------------------------------------------------------------------
+
bool EntryImpl::CreateDataBlock(int index, int size) {
DCHECK(index >= 0 && index < kNumStreams);
@@ -868,29 +895,6 @@
}
}
-void EntryImpl::ReportIOTime(Operation op, const base::Time& start) {
- int group = backend_->GetSizeGroup();
- switch (op) {
- case kRead:
- CACHE_UMA(AGE_MS, "ReadTime", group, start);
- break;
- case kWrite:
- CACHE_UMA(AGE_MS, "WriteTime", group, start);
- break;
- case kSparseRead:
- CACHE_UMA(AGE_MS, "SparseReadTime", 0, start);
- break;
- case kSparseWrite:
- CACHE_UMA(AGE_MS, "SparseWriteTime", 0, start);
- break;
- case kAsyncIO:
- CACHE_UMA(AGE_MS, "AsyncIOTime", group, start);
- break;
- default:
- NOTREACHED();
- }
-}
-
void EntryImpl::Log(const char* msg) {
int dirty = 0;
if (node_.HasData()) {
« no previous file with comments | « no previous file | net/disk_cache/mem_entry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698