mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Don't require time to be available for samples.
This commit is contained in:
parent
051b1ba8f5
commit
74e2a63516
@ -928,20 +928,6 @@ static void SetupSampling( int64_t& samplingPeriod )
|
||||
InitRpmalloc();
|
||||
sched_param sp = { 5 };
|
||||
pthread_setschedparam( pthread_self(), SCHED_FIFO, &sp );
|
||||
#if defined TRACY_HW_TIMER && ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 )
|
||||
for( int i=0; i<s_numBuffers; i++ )
|
||||
{
|
||||
if( s_ring[i].GetId() == EventCallstack && !s_ring[i].CheckTscCaps() )
|
||||
{
|
||||
for( int j=0; j<s_numBuffers; j++ ) s_ring[j].~RingBuffer<RingBufSize>();
|
||||
tracy_free_fast( s_ring );
|
||||
const char* err = "Tracy Profiler: sampling is disabled due to non-native scheduler clock. Are you running under a VM?";
|
||||
TracyDebug( err );
|
||||
Profiler::MessageAppInfo( err, strlen( err ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for( int i=0; i<s_numBuffers; i++ ) s_ring[i].Enable();
|
||||
for(;;)
|
||||
{
|
||||
@ -990,9 +976,7 @@ static void SetupSampling( int64_t& samplingPeriod )
|
||||
{
|
||||
#if defined TRACY_HW_TIMER && ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 )
|
||||
t0 = ring.ConvertTimeToTsc( t0 );
|
||||
if( t0 != 0 )
|
||||
#endif
|
||||
{
|
||||
auto trace = (uint64_t*)tracy_malloc_fast( ( 1 + cnt ) * sizeof( uint64_t ) );
|
||||
ring.Read( trace+1, offset, sizeof( uint64_t ) * cnt );
|
||||
|
||||
@ -1033,7 +1017,6 @@ static void SetupSampling( int64_t& samplingPeriod )
|
||||
TracyLfqCommit;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Layout:
|
||||
@ -1047,9 +1030,7 @@ static void SetupSampling( int64_t& samplingPeriod )
|
||||
|
||||
#if defined TRACY_HW_TIMER && ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 )
|
||||
t0 = ring.ConvertTimeToTsc( t0 );
|
||||
if( t0 != 0 )
|
||||
#endif
|
||||
{
|
||||
QueueType type;
|
||||
switch( id )
|
||||
{
|
||||
@ -1082,7 +1063,6 @@ static void SetupSampling( int64_t& samplingPeriod )
|
||||
TracyLfqCommit;
|
||||
}
|
||||
}
|
||||
}
|
||||
pos += hdr.size;
|
||||
}
|
||||
assert( pos == end );
|
||||
|
Loading…
Reference in New Issue
Block a user