mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Process additional hardware sample data.
This commit is contained in:
parent
5f3d1c0faf
commit
227a8d1aee
@ -255,6 +255,10 @@ struct HwSampleData
|
|||||||
{
|
{
|
||||||
uint32_t cycles;
|
uint32_t cycles;
|
||||||
uint32_t retired;
|
uint32_t retired;
|
||||||
|
uint32_t cacheRef;
|
||||||
|
uint32_t cacheMiss;
|
||||||
|
uint32_t branchRetired;
|
||||||
|
uint32_t branchMiss;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { HwSampleDataSize = sizeof( HwSampleData ) };
|
enum { HwSampleDataSize = sizeof( HwSampleData ) };
|
||||||
|
@ -4467,6 +4467,18 @@ bool Worker::Process( const QueueItem& ev )
|
|||||||
case QueueType::HwSampleInstructionRetired:
|
case QueueType::HwSampleInstructionRetired:
|
||||||
ProcessHwSampleInstructionRetired( ev.hwSample );
|
ProcessHwSampleInstructionRetired( ev.hwSample );
|
||||||
break;
|
break;
|
||||||
|
case QueueType::HwSampleCacheReference:
|
||||||
|
ProcessHwSampleCacheReference( ev.hwSample );
|
||||||
|
break;
|
||||||
|
case QueueType::HwSampleCacheMiss:
|
||||||
|
ProcessHwSampleCacheMiss( ev.hwSample );
|
||||||
|
break;
|
||||||
|
case QueueType::HwSampleBranchRetired:
|
||||||
|
ProcessHwSampleBranchRetired( ev.hwSample );
|
||||||
|
break;
|
||||||
|
case QueueType::HwSampleBranchMiss:
|
||||||
|
ProcessHwSampleBranchMiss( ev.hwSample );
|
||||||
|
break;
|
||||||
case QueueType::ParamSetup:
|
case QueueType::ParamSetup:
|
||||||
ProcessParamSetup( ev.paramSetup );
|
ProcessParamSetup( ev.paramSetup );
|
||||||
break;
|
break;
|
||||||
@ -6288,6 +6300,34 @@ void Worker::ProcessHwSampleInstructionRetired( const QueueHwSample& ev )
|
|||||||
it->second.retired++;
|
it->second.retired++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Worker::ProcessHwSampleCacheReference( const QueueHwSample& ev )
|
||||||
|
{
|
||||||
|
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++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Worker::ProcessHwSampleCacheMiss( const QueueHwSample& ev )
|
||||||
|
{
|
||||||
|
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++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Worker::ProcessHwSampleBranchRetired( const QueueHwSample& ev )
|
||||||
|
{
|
||||||
|
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++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Worker::ProcessHwSampleBranchMiss( const QueueHwSample& ev )
|
||||||
|
{
|
||||||
|
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++;
|
||||||
|
}
|
||||||
|
|
||||||
void Worker::ProcessParamSetup( const QueueParamSetup& ev )
|
void Worker::ProcessParamSetup( const QueueParamSetup& ev )
|
||||||
{
|
{
|
||||||
CheckString( ev.name );
|
CheckString( ev.name );
|
||||||
|
@ -686,6 +686,10 @@ private:
|
|||||||
tracy_force_inline void ProcessTidToPid( const QueueTidToPid& ev );
|
tracy_force_inline void ProcessTidToPid( const QueueTidToPid& ev );
|
||||||
tracy_force_inline void ProcessHwSampleCpuCycle( const QueueHwSample& ev );
|
tracy_force_inline void ProcessHwSampleCpuCycle( const QueueHwSample& ev );
|
||||||
tracy_force_inline void ProcessHwSampleInstructionRetired( const QueueHwSample& ev );
|
tracy_force_inline void ProcessHwSampleInstructionRetired( const QueueHwSample& ev );
|
||||||
|
tracy_force_inline void ProcessHwSampleCacheReference( const QueueHwSample& ev );
|
||||||
|
tracy_force_inline void ProcessHwSampleCacheMiss( const QueueHwSample& ev );
|
||||||
|
tracy_force_inline void ProcessHwSampleBranchRetired( const QueueHwSample& ev );
|
||||||
|
tracy_force_inline void ProcessHwSampleBranchMiss( const QueueHwSample& ev );
|
||||||
tracy_force_inline void ProcessParamSetup( const QueueParamSetup& ev );
|
tracy_force_inline void ProcessParamSetup( const QueueParamSetup& ev );
|
||||||
tracy_force_inline void ProcessCpuTopology( const QueueCpuTopology& ev );
|
tracy_force_inline void ProcessCpuTopology( const QueueCpuTopology& ev );
|
||||||
tracy_force_inline void ProcessMemNamePayload( const QueueMemNamePayload& ev );
|
tracy_force_inline void ProcessMemNamePayload( const QueueMemNamePayload& ev );
|
||||||
|
Loading…
Reference in New Issue
Block a user