mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Update last time when callstack or hw samples arrive.
This commit is contained in:
parent
e071b9043f
commit
e77224975d
@ -6322,6 +6322,7 @@ void Worker::ProcessCallstackSample( const QueueCallstackSample& ev )
|
||||
|
||||
const auto refTime = RefTime( m_refTimeCtx, ev.time );
|
||||
const auto t = refTime == 0 ? 0 : TscTime( refTime );
|
||||
if( m_data.lastTime < t ) m_data.lastTime = t;
|
||||
|
||||
auto& td = *NoticeThread( ev.thread );
|
||||
|
||||
@ -6366,6 +6367,7 @@ void Worker::ProcessCallstackSampleContextSwitch( const QueueCallstackSample& ev
|
||||
|
||||
const auto refTime = RefTime( m_refTimeCtx, ev.time );
|
||||
const auto t = refTime == 0 ? 0 : TscTime( refTime );
|
||||
if( m_data.lastTime < t ) m_data.lastTime = t;
|
||||
|
||||
auto& td = *NoticeThread( ev.thread );
|
||||
|
||||
@ -6770,6 +6772,7 @@ void Worker::ProcessTidToPid( const QueueTidToPid& ev )
|
||||
void Worker::ProcessHwSampleCpuCycle( const QueueHwSample& ev )
|
||||
{
|
||||
const auto time = ev.time == 0 ? 0 : TscTime( ev.time );
|
||||
if( m_data.lastTime < time ) m_data.lastTime = time;
|
||||
auto it = m_data.hwSamples.find( ev.ip );
|
||||
if( it == m_data.hwSamples.end() ) it = m_data.hwSamples.emplace( ev.ip, HwSampleData {} ).first;
|
||||
it->second.cycles.push_back( time );
|
||||
@ -6778,6 +6781,7 @@ void Worker::ProcessHwSampleCpuCycle( const QueueHwSample& ev )
|
||||
void Worker::ProcessHwSampleInstructionRetired( const QueueHwSample& ev )
|
||||
{
|
||||
const auto time = ev.time == 0 ? 0 : TscTime( ev.time );
|
||||
if( m_data.lastTime < time ) m_data.lastTime = time;
|
||||
auto it = m_data.hwSamples.find( ev.ip );
|
||||
if( it == m_data.hwSamples.end() ) it = m_data.hwSamples.emplace( ev.ip, HwSampleData {} ).first;
|
||||
it->second.retired.push_back( time );
|
||||
@ -6786,6 +6790,7 @@ void Worker::ProcessHwSampleInstructionRetired( const QueueHwSample& ev )
|
||||
void Worker::ProcessHwSampleCacheReference( const QueueHwSample& ev )
|
||||
{
|
||||
const auto time = ev.time == 0 ? 0 : TscTime( ev.time );
|
||||
if( m_data.lastTime < time ) m_data.lastTime = time;
|
||||
auto it = m_data.hwSamples.find( ev.ip );
|
||||
if( it == m_data.hwSamples.end() ) it = m_data.hwSamples.emplace( ev.ip, HwSampleData {} ).first;
|
||||
it->second.cacheRef.push_back( time );
|
||||
@ -6794,6 +6799,7 @@ void Worker::ProcessHwSampleCacheReference( const QueueHwSample& ev )
|
||||
void Worker::ProcessHwSampleCacheMiss( const QueueHwSample& ev )
|
||||
{
|
||||
const auto time = ev.time == 0 ? 0 : TscTime( ev.time );
|
||||
if( m_data.lastTime < time ) m_data.lastTime = time;
|
||||
auto it = m_data.hwSamples.find( ev.ip );
|
||||
if( it == m_data.hwSamples.end() ) it = m_data.hwSamples.emplace( ev.ip, HwSampleData {} ).first;
|
||||
it->second.cacheMiss.push_back( time );
|
||||
@ -6802,6 +6808,7 @@ void Worker::ProcessHwSampleCacheMiss( const QueueHwSample& ev )
|
||||
void Worker::ProcessHwSampleBranchRetired( const QueueHwSample& ev )
|
||||
{
|
||||
const auto time = ev.time == 0 ? 0 : TscTime( ev.time );
|
||||
if( m_data.lastTime < time ) m_data.lastTime = time;
|
||||
auto it = m_data.hwSamples.find( ev.ip );
|
||||
if( it == m_data.hwSamples.end() ) it = m_data.hwSamples.emplace( ev.ip, HwSampleData {} ).first;
|
||||
it->second.branchRetired.push_back( time );
|
||||
@ -6811,6 +6818,7 @@ void Worker::ProcessHwSampleBranchRetired( const QueueHwSample& ev )
|
||||
void Worker::ProcessHwSampleBranchMiss( const QueueHwSample& ev )
|
||||
{
|
||||
const auto time = ev.time == 0 ? 0 : TscTime( ev.time );
|
||||
if( m_data.lastTime < time ) m_data.lastTime = time;
|
||||
auto it = m_data.hwSamples.find( ev.ip );
|
||||
if( it == m_data.hwSamples.end() ) it = m_data.hwSamples.emplace( ev.ip, HwSampleData {} ).first;
|
||||
it->second.branchMiss.push_back( time );
|
||||
|
Loading…
Reference in New Issue
Block a user