mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Don't error on frame end without start (#666)
With on-demand profiling we're very likely to connect in the middle of a discontinuous frame and thus receive a frame end without any preceding frame start. So don't error out in this case.
This commit is contained in:
parent
906f73cab3
commit
ad39a01de1
@ -2756,6 +2756,7 @@ void Worker::Exec()
|
||||
m_captureTime = welcome.epoch;
|
||||
m_executableTime = welcome.exectime;
|
||||
m_ignoreMemFreeFaults = ( welcome.flags & WelcomeFlag::OnDemand ) || ( welcome.flags & WelcomeFlag::IsApple );
|
||||
m_ignoreFrameEndFaults = welcome.flags & WelcomeFlag::OnDemand;
|
||||
m_data.cpuArch = (CpuArchitecture)welcome.cpuArch;
|
||||
m_codeTransfer = welcome.flags & WelcomeFlag::CodeTransfer;
|
||||
m_combineSamples = welcome.flags & WelcomeFlag::CombineSamples;
|
||||
@ -5076,12 +5077,12 @@ void Worker::ProcessFrameMarkEnd( const QueueFrameMark& ev )
|
||||
} );
|
||||
|
||||
assert( fd->continuous == 0 );
|
||||
const auto time = TscTime( ev.time );
|
||||
if( fd->frames.empty() )
|
||||
{
|
||||
FrameEndFailure();
|
||||
if( !m_ignoreFrameEndFaults ) FrameEndFailure();
|
||||
return;
|
||||
}
|
||||
const auto time = TscTime( ev.time );
|
||||
assert( fd->frames.back().end == -1 );
|
||||
fd->frames.back().end = time;
|
||||
if( m_data.lastTime < time ) m_data.lastTime = time;
|
||||
|
@ -980,6 +980,7 @@ private:
|
||||
int m_bufferOffset;
|
||||
bool m_onDemand;
|
||||
bool m_ignoreMemFreeFaults;
|
||||
bool m_ignoreFrameEndFaults;
|
||||
bool m_codeTransfer;
|
||||
bool m_combineSamples;
|
||||
bool m_identifySamples = false;
|
||||
|
Loading…
Reference in New Issue
Block a user