mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-14 04:01:48 +00:00
Clamp previous ghost zones to current sample time.
This commit is contained in:
parent
191ff93822
commit
99544f4655
@ -4047,6 +4047,17 @@ int Worker::AddGhostZone( const VarArray<CallstackFrameId>& cs, Vector<GhostZone
|
|||||||
static Vector<InlineStackData> stack;
|
static Vector<InlineStackData> stack;
|
||||||
GetStackWithInlines( stack, cs );
|
GetStackWithInlines( stack, cs );
|
||||||
|
|
||||||
|
if( !vec->empty() && vec->back().end.Val() > (int64_t)t )
|
||||||
|
{
|
||||||
|
auto tmp = vec;
|
||||||
|
while( tmp->size() > 0 )
|
||||||
|
{
|
||||||
|
auto& back = tmp->back();
|
||||||
|
back.end.SetVal( t );
|
||||||
|
if( back.child < 0 ) break;
|
||||||
|
tmp = &m_data.ghostChildren[back.child];
|
||||||
|
}
|
||||||
|
}
|
||||||
const uint64_t refBackTime = vec->empty() ? 0 : vec->back().end.Val();
|
const uint64_t refBackTime = vec->empty() ? 0 : vec->back().end.Val();
|
||||||
int gcnt = 0;
|
int gcnt = 0;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user