mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Fix assert when propagate inlines was enabled.
This commit is contained in:
parent
30f1b901a9
commit
651c6c5350
@ -5590,6 +5590,16 @@ const std::vector<uint64_t>* SourceView::GetAddressesForLocation( uint32_t fileS
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// In some cases debug data can be nonsense, assigning an inline function to the same line as the parent.
|
||||||
|
// The specific example is in TracySysTrace.cpp:1150, which has the following local stack trace:
|
||||||
|
// 1. RingBuffer::Enable() TracySysTrace.cpp:1150
|
||||||
|
// 2. SysTraceWorker() TracySysTrace.cpp:1150
|
||||||
|
// RingBuffer::Enable() is in TracyRingBuffer.hpp:74, and this line is assigned to the remaining asm lines
|
||||||
|
// generated by this inline function. But for some reason, the parent call site is assigned for the first
|
||||||
|
// asm line, that should be assigned to the inline function itself.
|
||||||
|
// Workaround this by checking if the asm line address is already in the list.
|
||||||
|
if( lit->second.back() == op.addr ) continue;
|
||||||
|
|
||||||
assert( lit->second.back() < op.addr );
|
assert( lit->second.back() < op.addr );
|
||||||
lit->second.emplace_back( op.addr );
|
lit->second.emplace_back( op.addr );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user