mirror of
https://github.com/wolfpld/tracy.git
synced 2026-08-26 21:18:22 +00:00
Use proper thread id for wait stacks.
ContextSwitchData::Thread() is something related to fibers. Pass and use known thread id from external context instead.
This commit is contained in:
@@ -293,7 +293,7 @@ private:
|
||||
void DrawSampleList( const TimelineContext& ctx, const std::vector<SamplesDraw>& drawList, const Vector<SampleData>& vec, int offset, uint64_t tid );
|
||||
void DrawZoneList( const TimelineContext& ctx, const std::vector<TimelineDraw>& drawList, int offset, uint64_t tid, int maxDepth, double margin );
|
||||
void DrawThreadCropper( const int depth, const uint64_t tid, const float xPos, const float yPos, const float ostep, const float cropperWidth, const bool hasCtxSwitches );
|
||||
void DrawContextSwitchList( const TimelineContext& ctx, const std::vector<ContextSwitchDraw>& drawList, const Vector<ContextSwitchData>& ctxSwitch, int offset, int endOffset, bool isFiber );
|
||||
void DrawContextSwitchList( const TimelineContext& ctx, const std::vector<ContextSwitchDraw>& drawList, const Vector<ContextSwitchData>& ctxSwitch, int offset, int endOffset, bool isFiber, uint64_t tid );
|
||||
int DispatchGpuZoneLevel( const Vector<short_ptr<GpuEvent>>& vec, bool hover, double pxns, int64_t nspx, const ImVec2& wpos, int offset, int depth, uint64_t thread, float yMin, float yMax, int64_t begin, int drift );
|
||||
template<typename Adapter, typename V>
|
||||
int DrawGpuZoneLevel( const V& vec, bool hover, double pxns, int64_t nspx, const ImVec2& wpos, int offset, int depth, uint64_t thread, float yMin, float yMax, int64_t begin, int drift );
|
||||
|
||||
@@ -166,7 +166,7 @@ const char* View::DecodeContextSwitchState( uint8_t state )
|
||||
}
|
||||
}
|
||||
|
||||
void View::DrawContextSwitchList( const TimelineContext& ctx, const std::vector<ContextSwitchDraw>& drawList, const Vector<ContextSwitchData>& ctxSwitch, int offset, int endOffset, bool isFiber )
|
||||
void View::DrawContextSwitchList( const TimelineContext& ctx, const std::vector<ContextSwitchDraw>& drawList, const Vector<ContextSwitchData>& ctxSwitch, int offset, int endOffset, bool isFiber, uint64_t tid )
|
||||
{
|
||||
constexpr float MinCtxSize = 4;
|
||||
|
||||
@@ -293,7 +293,7 @@ void View::DrawContextSwitchList( const TimelineContext& ctx, const std::vector<
|
||||
{
|
||||
m_callstackView = {
|
||||
.id = waitStack,
|
||||
.thread = m_worker.DecompressThread( ev.Thread() ),
|
||||
.thread = tid,
|
||||
.wait = {
|
||||
.time = waitTime,
|
||||
.reason = waitReason,
|
||||
|
||||
@@ -84,7 +84,7 @@ void View::DrawThread( const TimelineContext& ctx, const ThreadData& thread, con
|
||||
{
|
||||
auto ctxSwitch = m_worker.GetContextSwitchData( thread.id );
|
||||
assert( ctxSwitch );
|
||||
DrawContextSwitchList( ctx, ctxDraw, ctxSwitch->v, ctxOffset, offset, thread.isFiber );
|
||||
DrawContextSwitchList( ctx, ctxDraw, ctxSwitch->v, ctxOffset, offset, thread.isFiber, thread.id );
|
||||
}
|
||||
if( hasSamples && !samplesDraw.empty() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user