mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Don't error on frame end without start in on-demand mode
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
92ea670205
@ -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;
|
||||
@ -5079,7 +5080,8 @@ void Worker::ProcessFrameMarkEnd( const QueueFrameMark& ev )
|
||||
const auto time = TscTime( ev.time );
|
||||
if( fd->frames.empty() )
|
||||
{
|
||||
FrameEndFailure();
|
||||
if ( !m_ignoreFrameEndFaults )
|
||||
FrameEndFailure();
|
||||
return;
|
||||
}
|
||||
assert( fd->frames.back().end == -1 );
|
||||
|
||||
@ -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…
x
Reference in New Issue
Block a user