Display inline functions.

This commit is contained in:
Bartosz Taudul 2020-02-27 15:28:58 +01:00
parent bc18862dc6
commit 8aa70211c0
4 changed files with 18 additions and 3 deletions

View File

@ -331,6 +331,7 @@ struct SymbolData : public CallstackFrameBasic
StringIdx imageName; StringIdx imageName;
StringIdx callFile; StringIdx callFile;
uint32_t callLine; uint32_t callLine;
uint8_t isInline;
}; };
enum { CallstackFrameBasicSize = sizeof( CallstackFrameBasic ) }; enum { CallstackFrameBasicSize = sizeof( CallstackFrameBasic ) };

View File

@ -11244,12 +11244,14 @@ void View::DrawStatistics()
const char* file = "[unknown]"; const char* file = "[unknown]";
const char* imageName = "[unknown]"; const char* imageName = "[unknown]";
uint32_t line = 0; uint32_t line = 0;
bool isInline = false;
auto sit = symMap.find( v->first ); auto sit = symMap.find( v->first );
if( sit != symMap.end() ) if( sit != symMap.end() )
{ {
name = m_worker.GetString( sit->second.name ); name = m_worker.GetString( sit->second.name );
imageName = m_worker.GetString( sit->second.imageName ); imageName = m_worker.GetString( sit->second.imageName );
isInline = sit->second.isInline;
if( m_statSampleLocation == 0 ) if( m_statSampleLocation == 0 )
{ {
file = m_worker.GetString( sit->second.file ); file = m_worker.GetString( sit->second.file );
@ -11262,6 +11264,15 @@ void View::DrawStatistics()
} }
} }
if( isInline )
{
#ifdef TRACY_EXTENDED_FONT
TextDisabledUnformatted( ICON_FA_CARET_RIGHT );
#else
TextDisabledUnformatted( "inline" );
#endif
ImGui::SameLine();
}
ImGui::TextUnformatted( name ); ImGui::TextUnformatted( name );
ImGui::NextColumn(); ImGui::NextColumn();
float indentVal = 0.f; float indentVal = 0.f;

View File

@ -1645,8 +1645,9 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
uint64_t symAddr; uint64_t symAddr;
StringIdx name, file, imageName, callFile; StringIdx name, file, imageName, callFile;
uint32_t line, callLine; uint32_t line, callLine;
f.Read7( symAddr, name, file, line, imageName, callFile, callLine ); uint8_t isInline;
m_data.symbolMap.emplace( symAddr, SymbolData { name, file, line, imageName, callFile, callLine } ); f.Read8( symAddr, name, file, line, imageName, callFile, callLine, isInline );
m_data.symbolMap.emplace( symAddr, SymbolData { name, file, line, imageName, callFile, callLine, isInline } );
} }
} }
@ -4827,7 +4828,7 @@ void Worker::ProcessCallstackFrame( const QueueCallstackFrame& ev )
if( ev.symAddr != 0 && m_data.symbolMap.find( ev.symAddr ) == m_data.symbolMap.end() && m_pendingSymbols.find( ev.symAddr ) == m_pendingSymbols.end() ) if( ev.symAddr != 0 && m_data.symbolMap.find( ev.symAddr ) == m_data.symbolMap.end() && m_pendingSymbols.find( ev.symAddr ) == m_pendingSymbols.end() )
{ {
m_pendingSymbols.emplace( ev.symAddr, SymbolPending { name, m_callstackFrameStaging->imageName, file, ev.line } ); m_pendingSymbols.emplace( ev.symAddr, SymbolPending { name, m_callstackFrameStaging->imageName, file, ev.line, idx < m_callstackFrameStaging->size - 1 } );
Query( ServerQuerySymbol, ev.symAddr ); Query( ServerQuerySymbol, ev.symAddr );
} }
@ -4862,6 +4863,7 @@ void Worker::ProcessSymbolInformation( const QueueSymbolInformation& ev )
sd.imageName = it->second.imageName; sd.imageName = it->second.imageName;
sd.callFile = it->second.file; sd.callFile = it->second.file;
sd.callLine = it->second.line; sd.callLine = it->second.line;
sd.isInline = it->second.isInline;
m_data.symbolMap.emplace( ev.symAddr, std::move( sd ) ); m_data.symbolMap.emplace( ev.symAddr, std::move( sd ) );
m_pendingSymbols.erase( it ); m_pendingSymbols.erase( it );

View File

@ -181,6 +181,7 @@ private:
StringIdx imageName; StringIdx imageName;
StringIdx file; StringIdx file;
uint32_t line; uint32_t line;
bool isInline;
}; };
struct DataBlock struct DataBlock