mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Allow filtering out kernel symbols from statistics view.
This commit is contained in:
parent
f145ca5897
commit
d2ebe341f2
@ -12508,6 +12508,10 @@ void View::DrawStatistics()
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox( ICON_FA_HAT_WIZARD " Include kernel", &m_statShowKernel );
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
}
|
||||
if( m_statMode == 1 && !m_worker.AreSymbolSamplesReady() )
|
||||
{
|
||||
@ -12731,13 +12735,13 @@ void View::DrawStatistics()
|
||||
if( m_showAllSymbols )
|
||||
{
|
||||
data.reserve( symMap.size() );
|
||||
if( m_statisticsFilter.IsActive() || m_statisticsImageFilter.IsActive() )
|
||||
if( m_statisticsFilter.IsActive() || m_statisticsImageFilter.IsActive() || !m_statShowKernel )
|
||||
{
|
||||
for( auto& v : symMap )
|
||||
{
|
||||
const auto name = m_worker.GetString( v.second.name );
|
||||
const auto image = m_worker.GetString( v.second.imageName );
|
||||
bool pass = m_statisticsFilter.PassFilter( name ) && m_statisticsImageFilter.PassFilter( image );
|
||||
bool pass = ( m_statShowKernel || ( v.first >> 63 ) == 0 ) && m_statisticsFilter.PassFilter( name ) && m_statisticsImageFilter.PassFilter( image );
|
||||
if( !pass && v.second.size.Val() == 0 )
|
||||
{
|
||||
const auto parentAddr = m_worker.GetSymbolForAddress( v.first );
|
||||
@ -12747,7 +12751,7 @@ void View::DrawStatistics()
|
||||
if( pit != symMap.end() )
|
||||
{
|
||||
const auto parentName = m_worker.GetString( pit->second.name );
|
||||
pass = m_statisticsFilter.PassFilter( parentName ) && m_statisticsImageFilter.PassFilter( image );
|
||||
pass = ( m_statShowKernel || ( parentAddr >> 63 ) == 0 ) && m_statisticsFilter.PassFilter( parentName ) && m_statisticsImageFilter.PassFilter( image );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -12834,7 +12838,7 @@ void View::DrawStatistics()
|
||||
else
|
||||
{
|
||||
data.reserve( symStat.size() );
|
||||
if( m_statisticsFilter.IsActive() || m_statisticsImageFilter.IsActive() )
|
||||
if( m_statisticsFilter.IsActive() || m_statisticsImageFilter.IsActive() || !m_statShowKernel )
|
||||
{
|
||||
for( auto& v : symStat )
|
||||
{
|
||||
@ -12843,7 +12847,7 @@ void View::DrawStatistics()
|
||||
{
|
||||
const auto name = m_worker.GetString( sit->second.name );
|
||||
const auto image = m_worker.GetString( sit->second.imageName );
|
||||
bool pass = m_statisticsFilter.PassFilter( name ) && m_statisticsImageFilter.PassFilter( image );
|
||||
bool pass = ( m_statShowKernel || ( v.first >> 63 ) == 0 ) && m_statisticsFilter.PassFilter( name ) && m_statisticsImageFilter.PassFilter( image );
|
||||
if( !pass && sit->second.size.Val() == 0 )
|
||||
{
|
||||
const auto parentAddr = m_worker.GetSymbolForAddress( v.first );
|
||||
@ -12853,7 +12857,7 @@ void View::DrawStatistics()
|
||||
if( pit != symMap.end() )
|
||||
{
|
||||
const auto parentName = m_worker.GetString( pit->second.name );
|
||||
pass = m_statisticsFilter.PassFilter( parentName ) && m_statisticsImageFilter.PassFilter( image );
|
||||
pass = ( m_statShowKernel || ( parentAddr >> 63 ) == 0 ) && m_statisticsFilter.PassFilter( parentName ) && m_statisticsImageFilter.PassFilter( image );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -398,6 +398,7 @@ private:
|
||||
bool m_showUnknownFrames = true;
|
||||
bool m_statSeparateInlines = false;
|
||||
bool m_statShowAddress = false;
|
||||
bool m_statShowKernel = true;
|
||||
bool m_groupChildrenLocations = false;
|
||||
bool m_allocTimeRelativeToZone = true;
|
||||
bool m_ctxSwitchTimeRelativeToZone = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user