mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 04:43:53 +00:00
Store context switch data for threads with ghost zones.
This commit is contained in:
parent
0ad24f6485
commit
eb48d24182
@ -2434,7 +2434,8 @@ const char* Worker::GetThreadName( uint64_t id ) const
|
|||||||
|
|
||||||
bool Worker::IsThreadLocal( uint64_t id )
|
bool Worker::IsThreadLocal( uint64_t id )
|
||||||
{
|
{
|
||||||
return m_data.localThreadCompress.Exists( id ) && RetrieveThread( id )->count > 0;
|
auto td = RetrieveThread( id );
|
||||||
|
return td && ( td->count > 0 || !td->ghostZones.empty() );
|
||||||
}
|
}
|
||||||
|
|
||||||
const SourceLocation& Worker::GetSourceLocation( int16_t srcloc ) const
|
const SourceLocation& Worker::GetSourceLocation( int16_t srcloc ) const
|
||||||
@ -6775,7 +6776,8 @@ void Worker::Write( FileWrite& f )
|
|||||||
ctxValid.reserve( m_data.ctxSwitch.size() );
|
ctxValid.reserve( m_data.ctxSwitch.size() );
|
||||||
for( auto it = m_data.ctxSwitch.begin(); it != m_data.ctxSwitch.end(); ++it )
|
for( auto it = m_data.ctxSwitch.begin(); it != m_data.ctxSwitch.end(); ++it )
|
||||||
{
|
{
|
||||||
if( m_data.localThreadCompress.Exists( it->first ) )
|
auto td = RetrieveThread( it->first );
|
||||||
|
if( td && ( td->count > 0 || !td->ghostZones.empty() ) )
|
||||||
{
|
{
|
||||||
ctxValid.emplace_back( it );
|
ctxValid.emplace_back( it );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user