mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Differentiate hw samples from code addresses.
This commit is contained in:
parent
2e38e70049
commit
3a0e12043d
@ -13923,6 +13923,12 @@ void View::DrawInfo()
|
||||
}
|
||||
#endif
|
||||
TextFocused( "Hardware samples:", RealToString( m_worker.GetHwSampleCount() ) );
|
||||
if( ImGui::IsItemHovered() )
|
||||
{
|
||||
ImGui::BeginTooltip();
|
||||
TextFocused( "Unique addresses:", RealToString( m_worker.GetHwSampleCountAddress() ) );
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
TextFocused( "Frame images:", RealToString( ficnt ) );
|
||||
if( ficnt != 0 && ImGui::IsItemHovered() )
|
||||
{
|
||||
|
||||
@ -7687,4 +7687,15 @@ const HwSampleData* Worker::GetHwSampleData( uint64_t addr ) const
|
||||
return &it->second;
|
||||
}
|
||||
|
||||
uint64_t Worker::GetHwSampleCount() const
|
||||
{
|
||||
uint64_t cnt = 0;
|
||||
for( auto& v : m_data.hwSamples )
|
||||
{
|
||||
cnt += v.second.cycles;
|
||||
cnt += v.second.retired;
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -449,7 +449,8 @@ public:
|
||||
uint64_t GetGhostZonesCount() const { return m_data.ghostCnt; }
|
||||
uint32_t GetFrameImageCount() const { return (uint32_t)m_data.frameImage.size(); }
|
||||
uint64_t GetStringsCount() const { return m_data.strings.size() + m_data.stringData.size(); }
|
||||
uint64_t GetHwSampleCount() const { return m_data.hwSamples.size(); }
|
||||
uint64_t GetHwSampleCountAddress() const { return m_data.hwSamples.size(); }
|
||||
uint64_t GetHwSampleCount() const;
|
||||
#ifndef TRACY_NO_STATISTICS
|
||||
uint64_t GetChildSamplesCountSyms() const { return m_data.childSamples.size(); }
|
||||
uint64_t GetChildSamplesCountFull() const;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user