mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Remove non-canonical pointer at the end of sampled stack.
This commit is contained in:
parent
07fe1266b0
commit
fc1b03d67d
@ -727,6 +727,12 @@ static void SetupSampling( int64_t& samplingPeriod )
|
|||||||
auto trace = (uint64_t*)tracy_malloc( ( 1 + cnt ) * sizeof( uint64_t ) );
|
auto trace = (uint64_t*)tracy_malloc( ( 1 + cnt ) * sizeof( uint64_t ) );
|
||||||
s_ring[i].Read( trace+1, offset, sizeof( uint64_t ) * cnt );
|
s_ring[i].Read( trace+1, offset, sizeof( uint64_t ) * cnt );
|
||||||
|
|
||||||
|
// remove non-canonical pointer at the end
|
||||||
|
const auto test = (int64_t)trace[cnt];
|
||||||
|
const auto m1 = test >> 63;
|
||||||
|
const auto m2 = test >> 47;
|
||||||
|
if( m1 != m2 ) cnt--;
|
||||||
|
|
||||||
// skip kernel frames
|
// skip kernel frames
|
||||||
uint64_t j;
|
uint64_t j;
|
||||||
for( j=0; j<cnt; j++ )
|
for( j=0; j<cnt; j++ )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user