1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Only identify samples when IdentifySamples is set.

This commit is contained in:
Bartosz Taudul
2021-12-04 15:16:17 +01:00
parent 20f8c8b8a4
commit bbbae35925
2 changed files with 4 additions and 2 deletions
+3 -2
View File
@@ -3067,6 +3067,7 @@ void Worker::Exec()
m_data.cpuArch = (CpuArchitecture)welcome.cpuArch;
m_codeTransfer = welcome.flags & WelcomeFlag::CodeTransfer;
m_combineSamples = welcome.flags & WelcomeFlag::CombineSamples;
m_identifySamples = welcome.flags & WelcomeFlag::IdentifySamples;
m_data.cpuId = welcome.cpuId;
memcpy( m_data.cpuManufacturer, welcome.cpuManufacturer, 12 );
m_data.cpuManufacturer[12] = '\0';
@@ -4399,7 +4400,7 @@ void Worker::DoPostponedWork()
m_data.newFramesWereReceived = false;
}
if( m_data.newContextSwitchesReceived )
if( m_identifySamples && m_data.newContextSwitchesReceived )
{
for( auto& td : m_data.threads )
{
@@ -6318,7 +6319,7 @@ void Worker::ProcessCallstackSampleImpl( const SampleData& sd, ThreadData& td )
m_data.samplesCnt++;
#ifndef TRACY_NO_STATISTICS
if( t == 0 )
if( t == 0 || !m_identifySamples )
{
ProcessCallstackSampleImplStats( sd, td );
}
+1
View File
@@ -918,6 +918,7 @@ private:
bool m_ignoreMemFreeFaults;
bool m_codeTransfer;
bool m_combineSamples;
bool m_identifySamples;
bool m_inconsistentSamples;
short_ptr<GpuCtxData> m_gpuCtxMap[256];