mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Sample data inconsistency warning.
This commit is contained in:
parent
2493cad5ad
commit
dfb1ce64df
@ -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();
|
||||
|
@ -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<ImportE
|
||||
, m_executableTime( 0 )
|
||||
, m_pid( 0 )
|
||||
, m_samplingPeriod( 0 )
|
||||
, m_inconsistentSamples( false )
|
||||
, m_stream( nullptr )
|
||||
, m_buffer( nullptr )
|
||||
, m_traceVersion( CurrentVersion )
|
||||
@ -510,6 +512,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
||||
: m_hasData( true )
|
||||
, m_stream( nullptr )
|
||||
, m_buffer( nullptr )
|
||||
, m_inconsistentSamples( false )
|
||||
{
|
||||
auto loadStart = std::chrono::high_resolution_clock::now();
|
||||
|
||||
@ -5983,7 +5986,7 @@ void Worker::ProcessCallstackSampleImpl( const SampleData& sd, ThreadData& td, i
|
||||
}
|
||||
else
|
||||
{
|
||||
assert( td.samples.back().time.Val() < t );
|
||||
if( !m_inconsistentSamples && td.samples.back().time.Val() >= t ) m_inconsistentSamples = true;
|
||||
td.samples.push_back_non_empty( sd );
|
||||
}
|
||||
|
||||
|
@ -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<GpuCtxData> m_gpuCtxMap[256];
|
||||
uint32_t m_pendingCallstackId = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user