mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +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
|
||||
{
|
||||
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 )
|
||||
{
|
||||
@ -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();
|
||||
for( auto& v : m_asm )
|
||||
@ -4044,7 +4044,7 @@ void SourceView::GatherIpHwStats( AddrStat& iptotalSrc, AddrStat& iptotalAsm, un
|
||||
uint64_t stat;
|
||||
if( view.m_statRange.active )
|
||||
{
|
||||
switch( m_cost )
|
||||
switch( cost )
|
||||
{
|
||||
case CostType::Cycles: stat = CountHwSamples( hw->cycles, 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
|
||||
{
|
||||
switch( m_cost )
|
||||
switch( cost )
|
||||
{
|
||||
case CostType::Cycles: stat = hw->cycles.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 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 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 );
|
||||
|
Loading…
Reference in New Issue
Block a user