Hardware sample data was already queried.

This commit is contained in:
Bartosz Taudul 2021-06-08 23:35:57 +02:00
parent 66318bdb3b
commit 2eb50bcf42
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -2771,10 +2771,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
if( ( m_childCalls && ipcnt.local + ipcnt.ext == 0 ) || ( !m_childCalls && ipcnt.local == 0 ) ) if( ( m_childCalls && ipcnt.local + ipcnt.ext == 0 ) || ( !m_childCalls && ipcnt.local == 0 ) )
{ {
ImGui::ItemSize( ImVec2( 7 * ts.x, ts.y ) ); ImGui::ItemSize( ImVec2( 7 * ts.x, ts.y ) );
if( ImGui::IsWindowHovered() && ImGui::IsMouseHoveringRect( wpos, wpos + ImVec2( ts.x * 7, ty ) ) ) if( hw && ImGui::IsWindowHovered() && ImGui::IsMouseHoveringRect( wpos, wpos + ImVec2( ts.x * 7, ty ) ) )
{
const auto hw = worker.GetHwSampleData( line.addr );
if( hw )
{ {
if( m_font ) ImGui::PopFont(); if( m_font ) ImGui::PopFont();
ImGui::BeginTooltip(); ImGui::BeginTooltip();
@ -2783,7 +2780,6 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
if( m_font ) ImGui::PushFont( m_font ); if( m_font ) ImGui::PushFont( m_font );
} }
} }
}
else else
{ {
const auto idx = &line - m_asm.data(); const auto idx = &line - m_asm.data();
@ -2833,7 +2829,6 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
TextFocused( "Child samples:", RealToString( ipcnt.ext ) ); TextFocused( "Child samples:", RealToString( ipcnt.ext ) );
} }
const auto hw = worker.GetHwSampleData( line.addr );
if( hw ) PrintHwSampleTooltip( cycles, retired, cacheRef, cacheMiss, branchRetired, branchMiss, false ); if( hw ) PrintHwSampleTooltip( cycles, retired, cacheRef, cacheMiss, branchRetired, branchMiss, false );
const auto& stats = *worker.GetSymbolStats( symAddrParents ); const auto& stats = *worker.GetSymbolStats( symAddrParents );