diff --git a/server/TracyView.cpp b/server/TracyView.cpp index d7121f5f..a718625f 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1318,6 +1318,17 @@ void View::DrawNotificationArea() } } } + if( m_worker.AreSamplesInconsistent() ) + { + ImGui::SameLine(); + TextColoredUnformatted( ImVec4( 1, 0.5, 0, 1 ), ICON_FA_EYE_DROPPER ); + if( ImGui::IsItemHovered() ) + { + ImGui::BeginTooltip(); + ImGui::TextUnformatted( "Sampling data and ghost zones may be displayed wrongly due to data inconsistency. Save and reload the trace to fix this." ); + ImGui::EndTooltip(); + } + } if( m_vd.drawEmptyLabels ) { ImGui::SameLine(); diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 0d651656..1cdaffc5 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -263,6 +263,7 @@ Worker::Worker( const char* addr, uint16_t port ) , m_stream( LZ4_createStreamDecode() ) , m_buffer( new char[TargetFrameSize*3 + 1] ) , m_bufferOffset( 0 ) + , m_inconsistentSamples( false ) , m_pendingStrings( 0 ) , m_pendingThreads( 0 ) , m_pendingExternalNames( 0 ) @@ -306,6 +307,7 @@ Worker::Worker( const char* name, const char* program, const std::vector= t ) m_inconsistentSamples = true; td.samples.push_back_non_empty( sd ); } diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index a8aaca52..c60b0211 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -597,6 +597,7 @@ public: int GetTraceVersion() const { return m_traceVersion; } uint8_t GetHandshakeStatus() const { return m_handshake.load( std::memory_order_relaxed ); } int64_t GetSamplingPeriod() const { return m_samplingPeriod; } + bool AreSamplesInconsistent() const { return m_inconsistentSamples; } static const LoadProgress& GetLoadProgress() { return s_loadProgress; } int64_t GetLoadTime() const { return m_loadTime; } @@ -896,6 +897,7 @@ private: bool m_ignoreMemFreeFaults; bool m_codeTransfer; bool m_combineSamples; + bool m_inconsistentSamples; short_ptr m_gpuCtxMap[256]; uint32_t m_pendingCallstackId = 0;