Remove dead code.

This commit is contained in:
Bartosz Taudul 2021-11-03 18:58:53 +01:00
parent fceb065329
commit 887826a28a
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -3194,47 +3194,6 @@ void Profiler::SymbolWorker()
} }
#endif #endif
#if 0
void Profiler::SendCallstackFrame( uint64_t ptr )
{
#ifdef TRACY_HAS_CALLSTACK
const auto frameData = DecodeCallstackPtr( ptr );
{
SendSingleString( frameData.imageName );
QueueItem item;
MemWrite( &item.hdr.type, QueueType::CallstackFrameSize );
MemWrite( &item.callstackFrameSize.ptr, ptr );
MemWrite( &item.callstackFrameSize.size, frameData.size );
AppendData( &item, QueueDataSize[(int)QueueType::CallstackFrameSize] );
}
InitRpmalloc();
for( uint8_t i=0; i<frameData.size; i++ )
{
const auto& frame = frameData.data[i];
SendSingleString( frame.name );
SendSecondString( frame.file );
QueueItem item;
MemWrite( &item.hdr.type, QueueType::CallstackFrame );
MemWrite( &item.callstackFrame.line, frame.line );
MemWrite( &item.callstackFrame.symAddr, frame.symAddr );
MemWrite( &item.callstackFrame.symLen, frame.symLen );
AppendData( &item, QueueDataSize[(int)QueueType::CallstackFrame] );
tracy_free_fast( (void*)frame.name );
tracy_free_fast( (void*)frame.file );
}
#endif
}
#endif
bool Profiler::HandleServerQuery() bool Profiler::HandleServerQuery()
{ {
ServerQueryPacket payload; ServerQueryPacket payload;
@ -3687,46 +3646,6 @@ void Profiler::HandleParameter( uint64_t payload )
AckServerQuery(); AckServerQuery();
} }
#if 0
void Profiler::HandleSymbolQuery( uint64_t symbol )
{
#ifdef TRACY_HAS_CALLSTACK
// Special handling for kernel frames
if( symbol >> 63 != 0 )
{
SendSingleString( "<kernel>" );
QueueItem item;
MemWrite( &item.hdr.type, QueueType::SymbolInformation );
MemWrite( &item.symbolInformation.line, 0 );
MemWrite( &item.symbolInformation.symAddr, symbol );
AppendData( &item, QueueDataSize[(int)QueueType::SymbolInformation] );
return;
}
# ifdef __ANDROID__
// On Android it's common for code to be in mappings that are only executable
// but not readable.
if( !EnsureReadable( symbol ) )
{
AckServerQuery();
return;
}
# endif
const auto sym = DecodeSymbolAddress( symbol );
SendSingleString( sym.file );
QueueItem item;
MemWrite( &item.hdr.type, QueueType::SymbolInformation );
MemWrite( &item.symbolInformation.line, sym.line );
MemWrite( &item.symbolInformation.symAddr, symbol );
AppendData( &item, QueueDataSize[(int)QueueType::SymbolInformation] );
if( sym.needFree ) tracy_free( (void*)sym.file );
#endif
}
#endif
void Profiler::HandleSymbolCodeQuery( uint64_t symbol, uint32_t size ) void Profiler::HandleSymbolCodeQuery( uint64_t symbol, uint32_t size )
{ {
#ifdef __ANDROID__ #ifdef __ANDROID__
@ -3780,28 +3699,6 @@ void Profiler::HandleSourceCodeQuery()
m_queryData = nullptr; m_queryData = nullptr;
} }
#if 0
void Profiler::SendCodeLocation( uint64_t ptr )
{
#ifdef TRACY_HAS_CALLSTACK
const auto sym = DecodeCodeAddress( ptr );
const uint64_t offset = ptr - sym.symAddr;
SendSingleString( sym.file );
QueueItem item;
MemWrite( &item.hdr.type, QueueType::CodeInformation );
MemWrite( &item.codeInformation.ptrOffset, offset );
MemWrite( &item.codeInformation.line, sym.line );
MemWrite( &item.codeInformation.symAddr, sym.symAddr );
AppendData( &item, QueueDataSize[(int)QueueType::CodeInformation] );
if( sym.needFree ) tracy_free( (void*)sym.file );
#endif
}
#endif
#if defined _WIN32 && defined TRACY_TIMER_QPC #if defined _WIN32 && defined TRACY_TIMER_QPC
int64_t Profiler::GetTimeQpc() int64_t Profiler::GetTimeQpc()
{ {