Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-10-09 22:12:47 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-10-09 22:12:47 +0300
commit60f0ed8c0e1444d3c55e8d1c9267c68c39b545dd (patch)
tree795049a7aef677c052236a8ff8a1a9960d71a559 /server
parent720f33978403a967d83d979fa8838ebfdb531198 (diff)
Include child calls in inline propagation.
Diffstat (limited to 'server')
-rw-r--r--server/TracySourceView.cpp68
1 files changed, 38 insertions, 30 deletions
diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp
index 91c98cfa..3451b034 100644
--- a/server/TracySourceView.cpp
+++ b/server/TracySourceView.cpp
@@ -5038,25 +5038,29 @@ void SourceView::GatherAdditionalIpStats( uint64_t baseAddr, AddrStatData& as, c
auto frame = worker.GetCallstackFrame( worker.PackPointer( ip ) );
if( frame )
{
- auto ffn = worker.GetString( frame->data[0].file );
- if( strcmp( ffn, filename ) == 0 )
+ const auto end = m_propagateInlines ? frame->size : 1;
+ for( uint8_t i=0; i<end; i++ )
{
- const auto line = frame->data[0].line;
- if( line != 0 )
+ auto ffn = worker.GetString( frame->data[i].file );
+ if( strcmp( ffn, filename ) == 0 )
{
- auto sit = as.ipCountSrc.find( line );
- if( sit == as.ipCountSrc.end() )
- {
- as.ipCountSrc.emplace( line, AddrStat{ 0, ccnt } );
- if( as.ipMaxSrc.ext < ccnt ) as.ipMaxSrc.ext = ccnt;
- }
- else
+ const auto line = frame->data[i].line;
+ if( line != 0 )
{
- const auto csum = sit->second.ext + ccnt;
- sit->second.ext = csum;
- if( as.ipMaxSrc.ext < csum ) as.ipMaxSrc.ext = csum;
+ auto sit = as.ipCountSrc.find( line );
+ if( sit == as.ipCountSrc.end() )
+ {
+ as.ipCountSrc.emplace( line, AddrStat{ 0, ccnt } );
+ if( as.ipMaxSrc.ext < ccnt ) as.ipMaxSrc.ext = ccnt;
+ }
+ else
+ {
+ const auto csum = sit->second.ext + ccnt;
+ sit->second.ext = csum;
+ if( as.ipMaxSrc.ext < csum ) as.ipMaxSrc.ext = csum;
+ }
+ as.ipTotalSrc.ext += ccnt;
}
- as.ipTotalSrc.ext += ccnt;
}
}
}
@@ -5087,25 +5091,29 @@ void SourceView::GatherAdditionalIpStats( uint64_t baseAddr, AddrStatData& as, c
auto frame = worker.GetCallstackFrame( worker.PackPointer( ip ) );
if( frame )
{
- auto ffn = worker.GetString( frame->data[0].file );
- if( strcmp( ffn, filename ) == 0 )
+ const auto end = m_propagateInlines ? frame->size : 1;
+ for( uint8_t i=0; i<end; i++ )
{
- const auto line = frame->data[0].line;
- if( line != 0 )
+ auto ffn = worker.GetString( frame->data[i].file );
+ if( strcmp( ffn, filename ) == 0 )
{
- auto sit = as.ipCountSrc.find( line );
- if( sit == as.ipCountSrc.end() )
- {
- as.ipCountSrc.emplace( line, AddrStat{ 0, ccnt } );
- if( as.ipMaxSrc.ext < ccnt ) as.ipMaxSrc.ext = ccnt;
- }
- else
+ const auto line = frame->data[i].line;
+ if( line != 0 )
{
- const auto csum = sit->second.ext + ccnt;
- sit->second.ext = csum;
- if( as.ipMaxSrc.ext < csum ) as.ipMaxSrc.ext = csum;
+ auto sit = as.ipCountSrc.find( line );
+ if( sit == as.ipCountSrc.end() )
+ {
+ as.ipCountSrc.emplace( line, AddrStat{ 0, ccnt } );
+ if( as.ipMaxSrc.ext < ccnt ) as.ipMaxSrc.ext = ccnt;
+ }
+ else
+ {
+ const auto csum = sit->second.ext + ccnt;
+ sit->second.ext = csum;
+ if( as.ipMaxSrc.ext < csum ) as.ipMaxSrc.ext = csum;
+ }
+ as.ipTotalSrc.ext += ccnt;
}
- as.ipTotalSrc.ext += ccnt;
}
}
}