mirror of
https://github.com/wolfpld/tracy
synced 2025-05-02 21:53:52 +00:00
Perform fast integer comparison before comparing strings.
This commit is contained in:
parent
47ec7de479
commit
564534c703
@ -4881,12 +4881,12 @@ void SourceView::GatherIpHwStats( AddrStatData& as, Worker& worker, const View&
|
||||
{
|
||||
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 )
|
||||
{
|
||||
const auto line = frame->data[i].line;
|
||||
if( line != 0 )
|
||||
{
|
||||
auto ffn = worker.GetString( frame->data[i].file );
|
||||
if( strcmp( ffn, filename ) == 0 )
|
||||
{
|
||||
auto it = as.ipCountSrc.find( line );
|
||||
if( it == as.ipCountSrc.end() )
|
||||
@ -4956,12 +4956,12 @@ void SourceView::CountHwStats( AddrStatData& as, Worker& worker, const View& vie
|
||||
{
|
||||
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 )
|
||||
{
|
||||
const auto line = frame->data[i].line;
|
||||
if( line != 0 )
|
||||
{
|
||||
auto ffn = worker.GetString( frame->data[i].file );
|
||||
if( strcmp( ffn, filename ) == 0 )
|
||||
{
|
||||
auto it = as.hwCountSrc.find( line );
|
||||
if( it == as.hwCountSrc.end() )
|
||||
@ -5007,12 +5007,12 @@ void SourceView::GatherIpStats( uint64_t baseAddr, AddrStatData& as, const Worke
|
||||
{
|
||||
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 )
|
||||
{
|
||||
const auto line = frame->data[i].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() )
|
||||
@ -5069,12 +5069,12 @@ void SourceView::GatherIpStats( uint64_t baseAddr, AddrStatData& as, const Worke
|
||||
{
|
||||
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 )
|
||||
{
|
||||
const auto line = frame->data[i].line;
|
||||
if( line != 0 )
|
||||
{
|
||||
auto ffn = worker.GetString( frame->data[i].file );
|
||||
if( strcmp( ffn, filename ) == 0 )
|
||||
{
|
||||
auto it = as.ipCountSrc.find( line );
|
||||
if( it == as.ipCountSrc.end() )
|
||||
@ -5134,12 +5134,12 @@ void SourceView::GatherAdditionalIpStats( uint64_t baseAddr, AddrStatData& as, c
|
||||
{
|
||||
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 )
|
||||
{
|
||||
const auto line = frame->data[i].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() )
|
||||
@ -5187,12 +5187,12 @@ void SourceView::GatherAdditionalIpStats( uint64_t baseAddr, AddrStatData& as, c
|
||||
{
|
||||
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 )
|
||||
{
|
||||
const auto line = frame->data[i].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() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user