mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Store wait stack in 4 bytes.
This commit is contained in:
parent
d085f2541a
commit
2456ae36bf
@ -44,7 +44,7 @@ struct ContextSwitchDrawFolded
|
|||||||
struct ContextSwitchDrawWaiting
|
struct ContextSwitchDrawWaiting
|
||||||
{
|
{
|
||||||
short_ptr<ContextSwitchData> prev;
|
short_ptr<ContextSwitchData> prev;
|
||||||
Int24 waitStack;
|
uint32_t waitStack;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ContextSwitchDraw
|
struct ContextSwitchDraw
|
||||||
|
@ -472,7 +472,7 @@ void TimelineItemThread::PreprocessContextSwitches( const TimelineContext& ctx,
|
|||||||
auto& ev = *it;
|
auto& ev = *it;
|
||||||
if( pit != citend )
|
if( pit != citend )
|
||||||
{
|
{
|
||||||
Int24 waitStack;
|
uint32_t waitStack = 0;
|
||||||
if( !sampleData.empty() )
|
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; } );
|
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; } );
|
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();
|
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 ) } );
|
auto& ref = m_ctxDraw.emplace_back( ContextSwitchDraw { ContextSwitchDrawType::Waiting, &ev, float( minpx ) } );
|
||||||
|
@ -237,7 +237,7 @@ void View::DrawContextSwitchList( const TimelineContext& ctx, const std::vector<
|
|||||||
}
|
}
|
||||||
if( tooltip )
|
if( tooltip )
|
||||||
{
|
{
|
||||||
const auto waitStack = v.waiting.waitStack.Val();
|
const auto waitStack = v.waiting.waitStack;
|
||||||
if( waitStack )
|
if( waitStack )
|
||||||
{
|
{
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
Loading…
Reference in New Issue
Block a user