mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Look for context switch stacks on both ends of a switch.
This commit is contained in:
parent
c5654c333a
commit
67c2ffcb17
@ -4051,7 +4051,15 @@ void View::DrawContextSwitches( const ContextSwitch* ctx, const Vector<SampleDat
|
||||
if( !sampleData.empty() )
|
||||
{
|
||||
auto sdit = std::lower_bound( sampleData.begin(), sampleData.end(), ev.Start(), [] ( const auto& l, const auto& r ) { return l.time.Val() < r; } );
|
||||
if( sdit != sampleData.end() && sdit->time.Val() == ev.Start() )
|
||||
bool found = sdit != sampleData.end() && sdit->time.Val() == ev.Start();
|
||||
if( !found && it != vec.begin() )
|
||||
{
|
||||
auto eit = it;
|
||||
--eit;
|
||||
sdit = std::lower_bound( sampleData.begin(), sampleData.end(), eit->End(), [] ( const auto& l, const auto& r ) { return l.time.Val() < r; } );
|
||||
found = sdit != sampleData.end() && sdit->time.Val() == eit->End();
|
||||
}
|
||||
if( found )
|
||||
{
|
||||
ImGui::Separator();
|
||||
TextDisabledUnformatted( ICON_FA_HOURGLASS_HALF " Wait stack:" );
|
||||
|
Loading…
Reference in New Issue
Block a user