mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Don't shadow variables.
This commit is contained in:
parent
c859d655ad
commit
4970c48c51
@ -3281,13 +3281,13 @@ void SourceView::SelectAsmLinesHover( uint32_t file, uint32_t line, const Worker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SourceView::GatherIpStats( uint64_t addr, 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 SourceView::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 )
|
||||||
{
|
{
|
||||||
const auto slzReady = worker.AreSourceLocationZonesReady();
|
const auto slzReady = worker.AreSourceLocationZonesReady();
|
||||||
auto filename = m_source.filename();
|
auto filename = m_source.filename();
|
||||||
if( limitView )
|
if( limitView )
|
||||||
{
|
{
|
||||||
auto vec = worker.GetSamplesForSymbol( addr );
|
auto vec = worker.GetSamplesForSymbol( baseAddr );
|
||||||
if( !vec ) return;
|
if( !vec ) return;
|
||||||
auto it = std::lower_bound( vec->begin(), vec->end(), view.m_statRange.min, [] ( const auto& lhs, const auto& rhs ) { return lhs.time.Val() < rhs; } );
|
auto it = std::lower_bound( vec->begin(), vec->end(), view.m_statRange.min, [] ( const auto& lhs, const auto& rhs ) { return lhs.time.Val() < rhs; } );
|
||||||
if( it == vec->end() ) return;
|
if( it == vec->end() ) return;
|
||||||
@ -3343,7 +3343,7 @@ void SourceView::GatherIpStats( uint64_t addr, AddrStat& iptotalSrc, AddrStat& i
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto ipmap = worker.GetSymbolInstructionPointers( addr );
|
auto ipmap = worker.GetSymbolInstructionPointers( baseAddr );
|
||||||
if( !ipmap ) return;
|
if( !ipmap ) return;
|
||||||
for( auto& ip : *ipmap )
|
for( auto& ip : *ipmap )
|
||||||
{
|
{
|
||||||
@ -3394,11 +3394,11 @@ void SourceView::GatherIpStats( uint64_t addr, AddrStat& iptotalSrc, AddrStat& i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t SourceView::CountAsmIpStats( uint64_t addr, const Worker& worker, bool limitView, const View& view )
|
uint32_t SourceView::CountAsmIpStats( uint64_t baseAddr, const Worker& worker, bool limitView, const View& view )
|
||||||
{
|
{
|
||||||
if( limitView )
|
if( limitView )
|
||||||
{
|
{
|
||||||
auto vec = worker.GetSamplesForSymbol( addr );
|
auto vec = worker.GetSamplesForSymbol( baseAddr );
|
||||||
if( !vec ) return 0;
|
if( !vec ) return 0;
|
||||||
auto it = std::lower_bound( vec->begin(), vec->end(), view.m_statRange.min, [] ( const auto& lhs, const auto& rhs ) { return lhs.time.Val() < rhs; } );
|
auto it = std::lower_bound( vec->begin(), vec->end(), view.m_statRange.min, [] ( const auto& lhs, const auto& rhs ) { return lhs.time.Val() < rhs; } );
|
||||||
if( it == vec->end() ) return 0;
|
if( it == vec->end() ) return 0;
|
||||||
@ -3408,7 +3408,7 @@ uint32_t SourceView::CountAsmIpStats( uint64_t addr, const Worker& worker, bool
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
uint32_t cnt = 0;
|
uint32_t cnt = 0;
|
||||||
auto ipmap = worker.GetSymbolInstructionPointers( addr );
|
auto ipmap = worker.GetSymbolInstructionPointers( baseAddr );
|
||||||
if( !ipmap ) return 0;
|
if( !ipmap ) return 0;
|
||||||
for( auto& ip : *ipmap ) cnt += ip.second;
|
for( auto& ip : *ipmap ) cnt += ip.second;
|
||||||
return cnt;
|
return cnt;
|
||||||
|
@ -146,8 +146,8 @@ 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 GatherIpStats( uint64_t addr, 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 );
|
||||||
uint32_t CountAsmIpStats( uint64_t addr, const Worker& worker, bool limitView, const View& view );
|
uint32_t CountAsmIpStats( uint64_t baseAddr, const Worker& worker, bool limitView, const View& view );
|
||||||
|
|
||||||
void SelectMicroArchitecture( const char* moniker );
|
void SelectMicroArchitecture( const char* moniker );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user