mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Map source location to assembly instructions.
This commit is contained in:
parent
9f0a6b8231
commit
387fdb30b0
@ -5542,7 +5542,20 @@ void Worker::ProcessCodeInformation( const QueueCodeInformation& ev )
|
|||||||
if( ev.line != 0 )
|
if( ev.line != 0 )
|
||||||
{
|
{
|
||||||
assert( m_data.codeAddressToLocation.find( ev.ptr ) == m_data.codeAddressToLocation.end() );
|
assert( m_data.codeAddressToLocation.find( ev.ptr ) == m_data.codeAddressToLocation.end() );
|
||||||
m_data.codeAddressToLocation.emplace( ev.ptr, PackFileLine( fit->second.idx, ev.line ) );
|
const auto packed = PackFileLine( fit->second.idx, ev.line );
|
||||||
|
m_data.codeAddressToLocation.emplace( ev.ptr, packed );
|
||||||
|
|
||||||
|
auto lit = m_data.locationCodeAddressList.find( packed );
|
||||||
|
if( lit == m_data.locationCodeAddressList.end() )
|
||||||
|
{
|
||||||
|
m_data.locationCodeAddressList.emplace( packed, Vector<uint64_t>( ev.ptr ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const bool needSort = lit->second.back() > ev.ptr;
|
||||||
|
lit->second.push_back( ev.ptr );
|
||||||
|
if( needSort ) pdqsort_branchless( lit->second.begin(), lit->second.end() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pendingCustomStrings.erase( fit );
|
m_pendingCustomStrings.erase( fit );
|
||||||
|
@ -298,6 +298,7 @@ private:
|
|||||||
uint64_t symbolCodeSize = 0;
|
uint64_t symbolCodeSize = 0;
|
||||||
|
|
||||||
unordered_flat_map<uint64_t, uint64_t> codeAddressToLocation;
|
unordered_flat_map<uint64_t, uint64_t> codeAddressToLocation;
|
||||||
|
unordered_flat_map<uint64_t, Vector<uint64_t>> locationCodeAddressList;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MbpsBlock
|
struct MbpsBlock
|
||||||
|
Loading…
Reference in New Issue
Block a user