mirror of
https://github.com/wolfpld/tracy
synced 2025-05-08 16:03:53 +00:00
Cache last CheckSourceLocation query.
Just knowing that the query was performed is enough here -- this function adds a new source location entry, if there already isn't one.
This commit is contained in:
parent
0f2503d334
commit
294793367f
@ -2563,10 +2563,14 @@ bool Worker::DispatchProcess( const QueueItem& ev, char*& ptr )
|
|||||||
|
|
||||||
void Worker::CheckSourceLocation( uint64_t ptr )
|
void Worker::CheckSourceLocation( uint64_t ptr )
|
||||||
{
|
{
|
||||||
|
if( m_data.checkSrclocLast != ptr )
|
||||||
|
{
|
||||||
|
m_data.checkSrclocLast = ptr;
|
||||||
if( m_data.sourceLocation.find( ptr ) == m_data.sourceLocation.end() )
|
if( m_data.sourceLocation.find( ptr ) == m_data.sourceLocation.end() )
|
||||||
{
|
{
|
||||||
NewSourceLocation( ptr );
|
NewSourceLocation( ptr );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Worker::NewSourceLocation( uint64_t ptr )
|
void Worker::NewSourceLocation( uint64_t ptr )
|
||||||
|
@ -214,6 +214,7 @@ private:
|
|||||||
|
|
||||||
std::pair<uint64_t, ThreadData*> threadDataLast = std::make_pair( std::numeric_limits<uint64_t>::max(), nullptr );
|
std::pair<uint64_t, ThreadData*> threadDataLast = std::make_pair( std::numeric_limits<uint64_t>::max(), nullptr );
|
||||||
std::pair<uint64_t, ContextSwitch*> ctxSwitchLast = std::make_pair( std::numeric_limits<uint64_t>::max(), nullptr );
|
std::pair<uint64_t, ContextSwitch*> ctxSwitchLast = std::make_pair( std::numeric_limits<uint64_t>::max(), nullptr );
|
||||||
|
uint64_t checkSrclocLast = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MbpsBlock
|
struct MbpsBlock
|
||||||
|
Loading…
x
Reference in New Issue
Block a user