mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Fix source-less sample count calculations.
This commit is contained in:
parent
3177865fc2
commit
0f42dc2e4c
@ -473,23 +473,26 @@ void SourceView::RenderSymbolView( const Worker& worker )
|
|||||||
{
|
{
|
||||||
for( auto& ip : *ipmap )
|
for( auto& ip : *ipmap )
|
||||||
{
|
{
|
||||||
auto frame = worker.GetCallstackFrame( ip.first );
|
if( m_file )
|
||||||
if( frame )
|
|
||||||
{
|
{
|
||||||
auto ffn = worker.GetString( frame->data[0].file );
|
auto frame = worker.GetCallstackFrame( ip.first );
|
||||||
if( strcmp( ffn, m_file ) == 0 )
|
if( frame )
|
||||||
{
|
{
|
||||||
const auto line = frame->data[0].line;
|
auto ffn = worker.GetString( frame->data[0].file );
|
||||||
auto it = ipcountSrc.find( line );
|
if( strcmp( ffn, m_file ) == 0 )
|
||||||
if( it == ipcountSrc.end() )
|
|
||||||
{
|
{
|
||||||
ipcountSrc.emplace( line, ip.second );
|
const auto line = frame->data[0].line;
|
||||||
|
auto it = ipcountSrc.find( line );
|
||||||
|
if( it == ipcountSrc.end() )
|
||||||
|
{
|
||||||
|
ipcountSrc.emplace( line, ip.second );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
it->second += ip.second;
|
||||||
|
}
|
||||||
|
iptotalSrc += ip.second;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
it->second += ip.second;
|
|
||||||
}
|
|
||||||
iptotalSrc += ip.second;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user