mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Separate IPC, cache and branch data in tooltip.
This commit is contained in:
parent
c6f071a66a
commit
3ba82ba4d6
@ -2626,34 +2626,45 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
const auto hw = worker.GetHwSampleData( line.addr );
|
const auto hw = worker.GetHwSampleData( line.addr );
|
||||||
if( hw )
|
if( hw )
|
||||||
{
|
{
|
||||||
ImGui::Separator();
|
if( hw->cycles || hw->retired )
|
||||||
if( hw->cycles && hw->retired )
|
|
||||||
{
|
{
|
||||||
char buf[32];
|
ImGui::Separator();
|
||||||
auto end = PrintFloat( buf, buf+32, float( hw->retired ) / hw->cycles, 2 );
|
if( hw->cycles && hw->retired )
|
||||||
*end = '\0';
|
{
|
||||||
TextFocused( "IPC:", buf );
|
char buf[32];
|
||||||
|
auto end = PrintFloat( buf, buf+32, float( hw->retired ) / hw->cycles, 2 );
|
||||||
|
*end = '\0';
|
||||||
|
TextFocused( "IPC:", buf );
|
||||||
|
}
|
||||||
|
if( hw->cycles ) TextFocused( "Cycles:", RealToString( hw->cycles ) );
|
||||||
|
if( hw->retired ) TextFocused( "Retirements:", RealToString( hw->retired ) );
|
||||||
}
|
}
|
||||||
if( hw->cycles ) TextFocused( "Cycles:", RealToString( hw->cycles ) );
|
if( hw->cacheRef || hw->cacheMiss )
|
||||||
if( hw->retired ) TextFocused( "Retirements:", RealToString( hw->retired ) );
|
|
||||||
if( hw->cacheRef )
|
|
||||||
{
|
{
|
||||||
char buf[32];
|
ImGui::Separator();
|
||||||
auto end = PrintFloat( buf, buf+32, float( 100 * hw->cacheMiss ) / hw->cacheRef, 2 );
|
if( hw->cacheRef )
|
||||||
memcpy( end, "%", 2 );
|
{
|
||||||
TextFocused( "Cache miss rate:", buf );
|
char buf[32];
|
||||||
TextFocused( "Cache references:", RealToString( hw->cacheRef ) );
|
auto end = PrintFloat( buf, buf+32, float( 100 * hw->cacheMiss ) / hw->cacheRef, 2 );
|
||||||
|
memcpy( end, "%", 2 );
|
||||||
|
TextFocused( "Cache miss rate:", buf );
|
||||||
|
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 )
|
|
||||||
{
|
{
|
||||||
char buf[32];
|
ImGui::Separator();
|
||||||
auto end = PrintFloat( buf, buf+32, float( 100 * hw->branchMiss ) / hw->branchRetired, 2 );
|
if( hw->branchRetired )
|
||||||
memcpy( end, "%", 2 );
|
{
|
||||||
TextFocused( "Branch mispredictions rate:", buf );
|
char buf[32];
|
||||||
TextFocused( "Retired branches:", RealToString( hw->branchRetired ) );
|
auto end = PrintFloat( buf, buf+32, float( 100 * hw->branchMiss ) / hw->branchRetired, 2 );
|
||||||
|
memcpy( end, "%", 2 );
|
||||||
|
TextFocused( "Branch mispredictions rate:", buf );
|
||||||
|
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 );
|
||||||
if( !stats.parents.empty() )
|
if( !stats.parents.empty() )
|
||||||
|
Loading…
Reference in New Issue
Block a user