summaryrefslogtreecommitdiffstats
path: root/net/tools/dump_cache
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-04 23:03:33 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-04 23:03:33 +0000
commit62cdf1eb96a4c410b503652a5656e0b197b1b9eb (patch)
treeda020c20415d39f79eab88c4a818934e1df2fede /net/tools/dump_cache
parenta100d13626ad0ddeb4b0a7bb81eb9a736acc4d11 (diff)
downloadchromium_src-62cdf1eb96a4c410b503652a5656e0b197b1b9eb.zip
chromium_src-62cdf1eb96a4c410b503652a5656e0b197b1b9eb.tar.gz
chromium_src-62cdf1eb96a4c410b503652a5656e0b197b1b9eb.tar.bz2
Disk cache: Add support for an extra data stream for each cache entry.
This is the first step to allow the http cache to store additional metadata for certain entries. The cache file format changes to version 2.0 so an effect of this cl is that the borwser will discard the old cache files. Review URL: http://codereview.chromium.org/12880 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6392 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools/dump_cache')
-rw-r--r--net/tools/dump_cache/dump_files.cc18
-rw-r--r--net/tools/dump_cache/upgrade.cc2
2 files changed, 15 insertions, 5 deletions
diff --git a/net/tools/dump_cache/dump_files.cc b/net/tools/dump_cache/dump_files.cc
index 67bdad2..1275254 100644
--- a/net/tools/dump_cache/dump_files.cc
+++ b/net/tools/dump_cache/dump_files.cc
@@ -61,6 +61,13 @@ void DumpIndexHeader(const std::wstring name) {
printf("last file number: %d\n", header.last_file);
printf("current id: %d\n", header.this_id);
printf("table length: %d\n", header.table_len);
+ for (int i = 0; i < 5; i++) {
+ printf("head %d: 0x%x\n", i, header.lru.heads[i]);
+ printf("tail %d: 0x%x\n", i, header.lru.tails[i]);
+ }
+ printf("transaction: 0x%x\n", header.lru.transaction);
+ printf("operation: %d\n", header.lru.operation);
+ printf("operation list: %d\n", header.lru.operation_list);
printf("-------------------------\n\n");
}
@@ -218,10 +225,13 @@ void DumpEntry(const disk_cache::EntryStore& entry) {
printf("key length: %d\n", entry.key_len);
printf("key: \"%s\"\n", key.c_str());
printf("key addr: 0x%x\n", entry.long_key);
- printf("data size 0: %d\n", entry.data_size[0]);
- printf("data size 1: %d\n", entry.data_size[1]);
- printf("data addr 0: 0x%x\n", entry.data_addr[0]);
- printf("data addr 1: 0x%x\n", entry.data_addr[1]);
+ printf("reuse count: %d\n", entry.reuse_count);
+ printf("refetch count: %d\n", entry.refetch_count);
+ printf("state: %d\n", entry.state);
+ for (int i = 0; i < 4; i++) {
+ printf("data size %d: %d\n", i, entry.data_size[i]);
+ printf("data addr %d: 0x%x\n", i, entry.data_addr[i]);
+ }
printf("----------\n\n");
}
diff --git a/net/tools/dump_cache/upgrade.cc b/net/tools/dump_cache/upgrade.cc
index c715f14..d048c6f 100644
--- a/net/tools/dump_cache/upgrade.cc
+++ b/net/tools/dump_cache/upgrade.cc
@@ -12,7 +12,7 @@ namespace {
const wchar_t kPipePrefix[] = L"\\\\.\\pipe\\dump_cache_";
const int kChannelSize = 64 * 1024;
-const int kNumStreams = 2;
+const int kNumStreams = 4;
// Simple macro to print out formatted debug messages. It is similar to a DLOG
// except that it doesn't include a header.