summaryrefslogtreecommitdiff
path: root/trace_replay
diff options
context:
space:
mode:
Diffstat (limited to 'trace_replay')
-rw-r--r--trace_replay/block_cache_tracer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/trace_replay/block_cache_tracer.cc b/trace_replay/block_cache_tracer.cc
index c70290b67..0cf394afa 100644
--- a/trace_replay/block_cache_tracer.cc
+++ b/trace_replay/block_cache_tracer.cc
@@ -28,8 +28,8 @@ bool ShouldTrace(const Slice& block_key, const TraceOptions& trace_options) {
}
// We use spatial downsampling so that we have a complete access history for a
// block.
- const uint64_t hash = GetSliceNPHash64(block_key);
- return hash % trace_options.sampling_frequency == 0;
+ return 0 == fastrange64(GetSliceNPHash64(block_key),
+ trace_options.sampling_frequency);
}
} // namespace