mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Make hw stats cost a parameter.
This commit is contained in:
parent
50f7deb1a3
commit
b4c1313a2e
@ -1228,7 +1228,7 @@ void SourceView::RenderSymbolView( Worker& worker, View& view )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GatherIpHwStats( iptotalSrc, iptotalAsm, ipcountSrc, ipcountAsm, ipmaxSrc, ipmaxAsm, worker, limitView, view );
|
GatherIpHwStats( iptotalSrc, iptotalAsm, ipcountSrc, ipcountAsm, ipmaxSrc, ipmaxAsm, worker, limitView, view, m_cost );
|
||||||
}
|
}
|
||||||
if( !m_calcInlineStats )
|
if( !m_calcInlineStats )
|
||||||
{
|
{
|
||||||
@ -4032,7 +4032,7 @@ void SourceView::SelectAsmLinesHover( uint32_t file, uint32_t line, const Worker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SourceView::GatherIpHwStats( AddrStat& iptotalSrc, AddrStat& iptotalAsm, unordered_flat_map<uint64_t, AddrStat>& ipcountSrc, unordered_flat_map<uint64_t, AddrStat>& ipcountAsm, AddrStat& ipmaxSrc, AddrStat& ipmaxAsm, Worker& worker, bool limitView, const View& view )
|
void SourceView::GatherIpHwStats( AddrStat& iptotalSrc, AddrStat& iptotalAsm, unordered_flat_map<uint64_t, AddrStat>& ipcountSrc, unordered_flat_map<uint64_t, AddrStat>& ipcountAsm, AddrStat& ipmaxSrc, AddrStat& ipmaxAsm, Worker& worker, bool limitView, const View& view, CostType cost )
|
||||||
{
|
{
|
||||||
auto filename = m_source.filename();
|
auto filename = m_source.filename();
|
||||||
for( auto& v : m_asm )
|
for( auto& v : m_asm )
|
||||||
@ -4044,7 +4044,7 @@ void SourceView::GatherIpHwStats( AddrStat& iptotalSrc, AddrStat& iptotalAsm, un
|
|||||||
uint64_t stat;
|
uint64_t stat;
|
||||||
if( view.m_statRange.active )
|
if( view.m_statRange.active )
|
||||||
{
|
{
|
||||||
switch( m_cost )
|
switch( cost )
|
||||||
{
|
{
|
||||||
case CostType::Cycles: stat = CountHwSamples( hw->cycles, view.m_statRange ); break;
|
case CostType::Cycles: stat = CountHwSamples( hw->cycles, view.m_statRange ); break;
|
||||||
case CostType::Retirements: stat = CountHwSamples( hw->retired, view.m_statRange ); break;
|
case CostType::Retirements: stat = CountHwSamples( hw->retired, view.m_statRange ); break;
|
||||||
@ -4059,7 +4059,7 @@ void SourceView::GatherIpHwStats( AddrStat& iptotalSrc, AddrStat& iptotalAsm, un
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch( m_cost )
|
switch( cost )
|
||||||
{
|
{
|
||||||
case CostType::Cycles: stat = hw->cycles.size(); break;
|
case CostType::Cycles: stat = hw->cycles.size(); break;
|
||||||
case CostType::Retirements: stat = hw->retired.size(); break;
|
case CostType::Retirements: stat = hw->retired.size(); break;
|
||||||
|
@ -160,7 +160,7 @@ private:
|
|||||||
void SelectAsmLines( uint32_t file, uint32_t line, const Worker& worker, bool changeAsmLine = true, uint64_t targetAddr = 0 );
|
void SelectAsmLines( uint32_t file, uint32_t line, const Worker& worker, bool changeAsmLine = true, uint64_t targetAddr = 0 );
|
||||||
void SelectAsmLinesHover( uint32_t file, uint32_t line, const Worker& worker );
|
void SelectAsmLinesHover( uint32_t file, uint32_t line, const Worker& worker );
|
||||||
|
|
||||||
void GatherIpHwStats( AddrStat& iptotalSrc, AddrStat& iptotalAsm, unordered_flat_map<uint64_t, AddrStat>& ipcountSrc, unordered_flat_map<uint64_t, AddrStat>& ipcountAsm, AddrStat& ipmaxSrc, AddrStat& ipmaxAsm, Worker& worker, bool limitView, const View& view );
|
void GatherIpHwStats( AddrStat& iptotalSrc, AddrStat& iptotalAsm, unordered_flat_map<uint64_t, AddrStat>& ipcountSrc, unordered_flat_map<uint64_t, AddrStat>& ipcountAsm, AddrStat& ipmaxSrc, AddrStat& ipmaxAsm, Worker& worker, bool limitView, const View& view, CostType cost );
|
||||||
void GatherIpStats( uint64_t baseAddr, AddrStat& iptotalSrc, AddrStat& iptotalAsm, unordered_flat_map<uint64_t, AddrStat>& ipcountSrc, unordered_flat_map<uint64_t, AddrStat>& ipcountAsm, AddrStat& ipmaxSrc, AddrStat& ipmaxAsm, const Worker& worker, bool limitView, const View& view );
|
void GatherIpStats( uint64_t baseAddr, AddrStat& iptotalSrc, AddrStat& iptotalAsm, unordered_flat_map<uint64_t, AddrStat>& ipcountSrc, unordered_flat_map<uint64_t, AddrStat>& ipcountAsm, AddrStat& ipmaxSrc, AddrStat& ipmaxAsm, const Worker& worker, bool limitView, const View& view );
|
||||||
void GatherAdditionalIpStats( uint64_t baseAddr, AddrStat& iptotalSrc, AddrStat& iptotalAsm, unordered_flat_map<uint64_t, AddrStat>& ipcountSrc, unordered_flat_map<uint64_t, AddrStat>& ipcountAsm, AddrStat& ipmaxSrc, AddrStat& ipmaxAsm, const Worker& worker, bool limitView, const View& view );
|
void GatherAdditionalIpStats( uint64_t baseAddr, AddrStat& iptotalSrc, AddrStat& iptotalAsm, unordered_flat_map<uint64_t, AddrStat>& ipcountSrc, unordered_flat_map<uint64_t, AddrStat>& ipcountAsm, AddrStat& ipmaxSrc, AddrStat& ipmaxAsm, const Worker& worker, bool limitView, const View& view );
|
||||||
uint32_t CountAsmIpStats( uint64_t baseAddr, const Worker& worker, bool limitView, const View& view );
|
uint32_t CountAsmIpStats( uint64_t baseAddr, const Worker& worker, bool limitView, const View& view );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user