1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

More references.

This commit is contained in:
Bartosz Taudul
2019-01-29 22:10:14 +01:00
parent 5e3390894d
commit 852fe03cbc
2 changed files with 14 additions and 10 deletions
+10 -7
View File
@@ -1168,9 +1168,10 @@ int64_t Worker::GetFrameTime( const FrameData& fd, size_t idx ) const
}
else
{
if( fd.frames[idx].end >= 0 )
const auto& frame = fd.frames[idx];
if( frame.end >= 0 )
{
return fd.frames[idx].end - fd.frames[idx].start;
return frame.end - frame.start;
}
else
{
@@ -3124,7 +3125,8 @@ void Worker::ReconstructMemAllocPlot()
if( aptr != aend && fptr != fend )
{
auto atime = aptr->timeAlloc;
auto ftime = mem.data[*fptr].timeFree;
const auto& memData = mem.data[*fptr];
auto ftime = memData.timeFree;
for(;;)
{
@@ -3142,7 +3144,7 @@ void Worker::ReconstructMemAllocPlot()
}
else
{
usage -= int64_t( mem.data[*fptr].size );
usage -= int64_t( memData.size );
assert( usage >= 0 );
if( max < usage ) max = usage;
ptr->time = ftime;
@@ -3150,7 +3152,7 @@ void Worker::ReconstructMemAllocPlot()
ptr++;
fptr++;
if( fptr == fend ) break;
ftime = mem.data[*fptr].timeFree;
ftime = memData.timeFree;
}
}
}
@@ -3169,8 +3171,9 @@ void Worker::ReconstructMemAllocPlot()
}
while( fptr != fend )
{
int64_t time = mem.data[*fptr].timeFree;
usage -= int64_t( mem.data[*fptr].size );
const auto& memData = mem.data[*fptr];
int64_t time = memData.timeFree;
usage -= int64_t( memData.size );
assert( usage >= 0 );
assert( max >= usage );
ptr->time = time;