From 025d0f3db612a0217d7775b07826cedbefdff7a7 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Fri, 27 Apr 2018 23:52:37 +0200 Subject: [PATCH] test/perf_local.cc: reduce scope of some variables Signed-off-by: Danny Al-Gaaf --- src/test/perf_local.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/test/perf_local.cc b/src/test/perf_local.cc index 037b31398ffd6..ede48395099cb 100644 --- a/src/test/perf_local.cc +++ b/src/test/perf_local.cc @@ -637,11 +637,10 @@ double perf_prefetch() uint64_t total_ticks = 0; int count = 10; char buf[16 * 64]; - uint64_t start, stop; for (int i = 0; i < count; i++) { PerfHelper::flush_cache(); - start = Cycles::rdtsc(); + uint64_t start = Cycles::rdtsc(); prefetch(&buf[576], 64); prefetch(&buf[0], 64); prefetch(&buf[512], 64); @@ -658,7 +657,7 @@ double perf_prefetch() prefetch(&buf[832], 64); prefetch(&buf[64], 64); prefetch(&buf[192], 64); - stop = Cycles::rdtsc(); + uint64_t stop = Cycles::rdtsc(); total_ticks += stop - start; } return Cycles::to_seconds(total_ticks) / count / 16; -- 2.39.5