From a3dd90529ccbb6427cf2e5df2aee8ed72c5a083d Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 3 Apr 2018 19:35:28 +0200 Subject: [PATCH] Rearrange memory reads. --- server/TracyView.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index f93039ff..6a3746be 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4049,6 +4049,8 @@ Vector View::GetMemoryPages() const const auto a0 = alloc.ptr - mem.low; const auto a1 = a0 + alloc.size; + int8_t val = alloc.timeFree < 0 ? 1 : ( alloc.timeFree > zvMid ? 1 : -1 ); + const auto p0 = a0 >> PageChunkBits; const auto p1 = a1 >> PageChunkBits; @@ -4057,8 +4059,6 @@ Vector View::GetMemoryPages() const const auto c0 = b0 >> ChunkBits; const auto c1 = b1 >> ChunkBits; - int8_t val = alloc.timeFree < 0 ? 1 : ( alloc.timeFree > zvMid ? 1 : -1 ); - if( p0 == p1 ) { auto page = pgptr + p0 * PageSize; @@ -4084,6 +4084,8 @@ Vector View::GetMemoryPages() const { const auto a0 = alloc.ptr - mem.low; const auto a1 = a0 + alloc.size; + const int8_t val = alloc.timeFree < 0 ? 1 : -1; + const auto p0 = a0 >> PageChunkBits; const auto p1 = a1 >> PageChunkBits; @@ -4092,8 +4094,6 @@ Vector View::GetMemoryPages() const const auto c0 = b0 >> ChunkBits; const auto c1 = b1 >> ChunkBits; - int8_t val = alloc.timeFree < 0 ? 1 : -1; - if( p0 == p1 ) { auto page = pgptr + p0 * PageSize;