mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Implement inline cost propagation down the stack.
This commit is contained in:
parent
dbad69cd4f
commit
720f339784
@ -4911,10 +4911,13 @@ void SourceView::GatherIpStats( uint64_t baseAddr, AddrStatData& as, const Worke
|
|||||||
auto frame = worker.GetCallstackFrame( it->ip );
|
auto frame = worker.GetCallstackFrame( it->ip );
|
||||||
if( frame )
|
if( frame )
|
||||||
{
|
{
|
||||||
auto ffn = worker.GetString( frame->data[0].file );
|
const auto end = m_propagateInlines ? frame->size : 1;
|
||||||
|
for( uint8_t i=0; i<end; i++ )
|
||||||
|
{
|
||||||
|
auto ffn = worker.GetString( frame->data[i].file );
|
||||||
if( strcmp( ffn, filename ) == 0 )
|
if( strcmp( ffn, filename ) == 0 )
|
||||||
{
|
{
|
||||||
const auto line = frame->data[0].line;
|
const auto line = frame->data[i].line;
|
||||||
if( line != 0 )
|
if( line != 0 )
|
||||||
{
|
{
|
||||||
auto sit = as.ipCountSrc.find( line );
|
auto sit = as.ipCountSrc.find( line );
|
||||||
@ -4934,6 +4937,7 @@ void SourceView::GatherIpStats( uint64_t baseAddr, AddrStatData& as, const Worke
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
auto addr = worker.GetCanonicalPointer( it->ip );
|
auto addr = worker.GetCanonicalPointer( it->ip );
|
||||||
auto sit = as.ipCountAsm.find( addr );
|
auto sit = as.ipCountAsm.find( addr );
|
||||||
@ -4969,10 +4973,13 @@ void SourceView::GatherIpStats( uint64_t baseAddr, AddrStatData& as, const Worke
|
|||||||
auto frame = worker.GetCallstackFrame( ip.first );
|
auto frame = worker.GetCallstackFrame( ip.first );
|
||||||
if( frame )
|
if( frame )
|
||||||
{
|
{
|
||||||
auto ffn = worker.GetString( frame->data[0].file );
|
const auto end = m_propagateInlines ? frame->size : 1;
|
||||||
|
for( uint8_t i=0; i<end; i++ )
|
||||||
|
{
|
||||||
|
auto ffn = worker.GetString( frame->data[i].file );
|
||||||
if( strcmp( ffn, filename ) == 0 )
|
if( strcmp( ffn, filename ) == 0 )
|
||||||
{
|
{
|
||||||
const auto line = frame->data[0].line;
|
const auto line = frame->data[i].line;
|
||||||
if( line != 0 )
|
if( line != 0 )
|
||||||
{
|
{
|
||||||
auto it = as.ipCountSrc.find( line );
|
auto it = as.ipCountSrc.find( line );
|
||||||
@ -4995,6 +5002,7 @@ void SourceView::GatherIpStats( uint64_t baseAddr, AddrStatData& as, const Worke
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SourceView::GatherAdditionalIpStats( uint64_t baseAddr, AddrStatData& as, const Worker& worker, bool limitView, const View& view )
|
void SourceView::GatherAdditionalIpStats( uint64_t baseAddr, AddrStatData& as, const Worker& worker, bool limitView, const View& view )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user