mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Remember if there is branch retirement data.
This commit is contained in:
parent
4a8c4bde34
commit
381f706796
@ -238,7 +238,7 @@ static tracy_force_inline void UpdateLockRange( LockMap& lockmap, const LockEven
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<size_t U>
|
template<size_t U>
|
||||||
static void ReadHwSampleVec( FileRead& f, SortedVector<Int48, Int48Sort>& vec, Slab<U>& slab )
|
static uint64_t ReadHwSampleVec( FileRead& f, SortedVector<Int48, Int48Sort>& vec, Slab<U>& slab )
|
||||||
{
|
{
|
||||||
uint64_t sz;
|
uint64_t sz;
|
||||||
f.Read( sz );
|
f.Read( sz );
|
||||||
@ -251,6 +251,7 @@ static void ReadHwSampleVec( FileRead& f, SortedVector<Int48, Int48Sort>& vec, S
|
|||||||
vec[i] = ReadTimeOffset( f, refTime );
|
vec[i] = ReadTimeOffset( f, refTime );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Should be just a simple comparison. Do this when protocol version changes.
|
// Should be just a simple comparison. Do this when protocol version changes.
|
||||||
@ -1915,7 +1916,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
|||||||
ReadHwSampleVec( f, data.retired, m_slab );
|
ReadHwSampleVec( f, data.retired, m_slab );
|
||||||
ReadHwSampleVec( f, data.cacheRef, m_slab );
|
ReadHwSampleVec( f, data.cacheRef, m_slab );
|
||||||
ReadHwSampleVec( f, data.cacheMiss, m_slab );
|
ReadHwSampleVec( f, data.cacheMiss, m_slab );
|
||||||
ReadHwSampleVec( f, data.branchRetired, m_slab );
|
if( ReadHwSampleVec( f, data.branchRetired, m_slab ) != 0 ) m_data.hasBranchRetirement = true;
|
||||||
ReadHwSampleVec( f, data.branchMiss, m_slab );
|
ReadHwSampleVec( f, data.branchMiss, m_slab );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7129,6 +7130,7 @@ void Worker::ProcessHwSampleBranchRetired( const QueueHwSample& ev )
|
|||||||
auto it = m_data.hwSamples.find( ev.ip );
|
auto it = m_data.hwSamples.find( ev.ip );
|
||||||
if( it == m_data.hwSamples.end() ) it = m_data.hwSamples.emplace( ev.ip, HwSampleData {} ).first;
|
if( it == m_data.hwSamples.end() ) it = m_data.hwSamples.emplace( ev.ip, HwSampleData {} ).first;
|
||||||
it->second.branchRetired.push_back( time );
|
it->second.branchRetired.push_back( time );
|
||||||
|
m_data.hasBranchRetirement = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Worker::ProcessHwSampleBranchMiss( const QueueHwSample& ev )
|
void Worker::ProcessHwSampleBranchMiss( const QueueHwSample& ev )
|
||||||
|
@ -391,6 +391,7 @@ private:
|
|||||||
unordered_flat_map<const char*, MemoryBlock, charutil::Hasher, charutil::Comparator> sourceFileCache;
|
unordered_flat_map<const char*, MemoryBlock, charutil::Hasher, charutil::Comparator> sourceFileCache;
|
||||||
|
|
||||||
unordered_flat_map<uint64_t, HwSampleData> hwSamples;
|
unordered_flat_map<uint64_t, HwSampleData> hwSamples;
|
||||||
|
bool hasBranchRetirement = false;
|
||||||
|
|
||||||
unordered_flat_map<uint64_t, uint64_t> fiberToThreadMap;
|
unordered_flat_map<uint64_t, uint64_t> fiberToThreadMap;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user