1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

0% miss rates are fine too.

This commit is contained in:
Bartosz Taudul 2021-05-20 02:31:00 +02:00
parent f0f3babacf
commit 5a7e9cdbdd
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -2636,21 +2636,21 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
} }
if( hw->cycles ) TextFocused( "Cycles:", RealToString( hw->cycles ) ); if( hw->cycles ) TextFocused( "Cycles:", RealToString( hw->cycles ) );
if( hw->retired ) TextFocused( "Retirements:", RealToString( hw->retired ) ); if( hw->retired ) TextFocused( "Retirements:", RealToString( hw->retired ) );
if( hw->cacheRef && hw->cacheMiss ) if( hw->cacheRef )
{ {
TextDisabledUnformatted( "Cache miss rate:" ); TextDisabledUnformatted( "Cache miss rate:" );
ImGui::SameLine(); ImGui::SameLine();
PrintPercentage( float( 100 * hw->cacheMiss ) / hw->cacheRef ); PrintPercentage( float( 100 * hw->cacheMiss ) / hw->cacheRef );
TextFocused( "Cache references:", RealToString( hw->cacheRef ) );
} }
if( hw->cacheRef ) TextFocused( "Cache references:", RealToString( hw->cacheRef ) );
if( hw->cacheMiss ) TextFocused( "Cache misses:", RealToString( hw->cacheMiss ) ); if( hw->cacheMiss ) TextFocused( "Cache misses:", RealToString( hw->cacheMiss ) );
if( hw->branchRetired && hw->branchMiss ) if( hw->branchRetired )
{ {
TextDisabledUnformatted( "Branch mispredictions rate:" ); TextDisabledUnformatted( "Branch mispredictions rate:" );
ImGui::SameLine(); ImGui::SameLine();
PrintPercentage( float( 100 * hw->branchMiss ) / hw->branchRetired ); PrintPercentage( float( 100 * hw->branchMiss ) / hw->branchRetired );
TextFocused( "Retired branches:", RealToString( hw->branchRetired ) );
} }
if( hw->branchRetired ) TextFocused( "Retired branches:", RealToString( hw->branchRetired ) );
if( hw->branchMiss ) TextFocused( "Branch mispredictions:", RealToString( hw->branchMiss ) ); if( hw->branchMiss ) TextFocused( "Branch mispredictions:", RealToString( hw->branchMiss ) );
} }
const auto& stats = *worker.GetSymbolStats( symAddrParents ); const auto& stats = *worker.GetSymbolStats( symAddrParents );