Store wait stack in 4 bytes.

This commit is contained in:
Bartosz Taudul 2023-03-22 21:55:02 +01:00
parent d085f2541a
commit 2456ae36bf
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
3 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ struct ContextSwitchDrawFolded
struct ContextSwitchDrawWaiting
{
short_ptr<ContextSwitchData> prev;
Int24 waitStack;
uint32_t waitStack;
};
struct ContextSwitchDraw

View File

@ -472,7 +472,7 @@ void TimelineItemThread::PreprocessContextSwitches( const TimelineContext& ctx,
auto& ev = *it;
if( pit != citend )
{
Int24 waitStack;
uint32_t waitStack = 0;
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; } );
@ -484,7 +484,7 @@ void TimelineItemThread::PreprocessContextSwitches( const TimelineContext& ctx,
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 ) waitStack = sdit->callstack;
if( found ) waitStack = sdit->callstack.Val();
}
auto& ref = m_ctxDraw.emplace_back( ContextSwitchDraw { ContextSwitchDrawType::Waiting, &ev, float( minpx ) } );

View File

@ -237,7 +237,7 @@ void View::DrawContextSwitchList( const TimelineContext& ctx, const std::vector<
}
if( tooltip )
{
const auto waitStack = v.waiting.waitStack.Val();
const auto waitStack = v.waiting.waitStack;
if( waitStack )
{
ImGui::Separator();