UpdateSampleStatistics() returns if all samples were processed.

This effectively is a check if all frames in a callstack are available.
This commit is contained in:
Bartosz Taudul 2020-05-31 14:05:16 +02:00
parent 940b598cf8
commit de5f8df9d3
2 changed files with 4 additions and 3 deletions

View File

@ -6283,7 +6283,7 @@ void Worker::ReconstructContextSwitchUsage()
m_data.ctxUsageReady = true;
}
void Worker::UpdateSampleStatistics( uint32_t callstack, uint32_t count, bool canPostpone )
bool Worker::UpdateSampleStatistics( uint32_t callstack, uint32_t count, bool canPostpone )
{
const auto& cs = GetCallstack( callstack );
const auto cssz = cs.size();
@ -6306,7 +6306,7 @@ void Worker::UpdateSampleStatistics( uint32_t callstack, uint32_t count, bool ca
it->second += count;
}
}
return;
return false;
}
else
{
@ -6325,6 +6325,7 @@ void Worker::UpdateSampleStatistics( uint32_t callstack, uint32_t count, bool ca
}
UpdateSampleStatisticsImpl( frames, cssz, count, cs );
return true;
}
void Worker::UpdateSampleStatisticsPostponed( decltype(Worker::DataBlock::postponedSamples.begin())& it )

View File

@ -730,7 +730,7 @@ private:
#ifndef TRACY_NO_STATISTICS
void ReconstructContextSwitchUsage();
void UpdateSampleStatistics( uint32_t callstack, uint32_t count, bool canPostpone );
bool UpdateSampleStatistics( uint32_t callstack, uint32_t count, bool canPostpone );
void UpdateSampleStatisticsPostponed( decltype(Worker::DataBlock::postponedSamples.begin())& it );
void UpdateSampleStatisticsImpl( const CallstackFrameData** frames, uint16_t framesCount, uint32_t count, const VarArray<CallstackFrameId>& cs );
#endif