Determine the number of bits of the hash that should be used to determine the cache shard. This, in turn, determines the number of shards.
| 61 | // Determine the number of bits of the hash that should be used to determine |
| 62 | // the cache shard. This, in turn, determines the number of shards. |
| 63 | int DetermineShardBits() { |
| 64 | int bits = PREDICT_FALSE(FLAGS_cache_force_single_shard) ? |
| 65 | 0 : Bits::Log2Ceiling(base::NumCPUs()); |
| 66 | VLOG(1) << "Will use " << (1 << bits) << " shards for recency list cache."; |
| 67 | return bits; |
| 68 | } |
| 69 | |
| 70 | string ToString(Cache::EvictionPolicy p) { |
| 71 | switch (p) { |