mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 20:53:52 +00:00
Allow filtering out external frames in flame graph.
This commit is contained in:
parent
70fc28506f
commit
9d839c52d1
@ -227,6 +227,18 @@ void View::BuildFlameGraph( const Worker& worker, std::vector<FlameGraphItem>& d
|
|||||||
const auto frame = frameData->data[j-1];
|
const auto frame = frameData->data[j-1];
|
||||||
const auto symaddr = frame.symAddr;
|
const auto symaddr = frame.symAddr;
|
||||||
if( symaddr != 0 )
|
if( symaddr != 0 )
|
||||||
|
{
|
||||||
|
bool active = true;
|
||||||
|
if( !m_flameExternal )
|
||||||
|
{
|
||||||
|
auto filename = m_worker.GetString( frame.file );
|
||||||
|
auto image = frameData->imageName.Active() ? m_worker.GetString( frameData->imageName ) : nullptr;
|
||||||
|
if( IsFrameExternal( filename, image ) )
|
||||||
|
{
|
||||||
|
active = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( active )
|
||||||
{
|
{
|
||||||
auto it = std::find_if( vec->begin(), vec->end(), [symaddr]( const auto& v ) { return v.srcloc == symaddr; } );
|
auto it = std::find_if( vec->begin(), vec->end(), [symaddr]( const auto& v ) { return v.srcloc == symaddr; } );
|
||||||
if( it == vec->end() )
|
if( it == vec->end() )
|
||||||
@ -245,6 +257,7 @@ void View::BuildFlameGraph( const Worker& worker, std::vector<FlameGraphItem>& d
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void SortFlameGraph( std::vector<FlameGraphItem>& data )
|
static void SortFlameGraph( std::vector<FlameGraphItem>& data )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user