1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Merge pull request #665 from tiago-rodrigues/trodrigues/offline_symbol_resolve

Add support for offline callstack symbol resolving
This commit is contained in:
Bartosz Taudul
2023-11-27 16:53:22 +01:00
committed by GitHub
12 changed files with 737 additions and 74 deletions
+6 -2
View File
@@ -446,7 +446,7 @@ public:
Worker( const char* addr, uint16_t port );
Worker( const char* name, const char* program, const std::vector<ImportEventTimeline>& timeline, const std::vector<ImportEventMessages>& messages, const std::vector<ImportEventPlots>& plots, const std::unordered_map<uint64_t, std::string>& threadNames );
Worker( FileRead& f, EventType::Type eventMask = EventType::All, bool bgTasks = true );
Worker( FileRead& f, EventType::Type eventMask = EventType::All, bool bgTasks = true, bool allowStringModification = false);
~Worker();
const std::string& GetAddr() const { return m_addr; }
@@ -549,6 +549,8 @@ public:
StringIdx GetLocationForAddress( uint64_t address, uint32_t& line ) const;
const uint64_t* GetInlineSymbolList( uint64_t sym, uint32_t len );
unordered_flat_map<CallstackFrameId, CallstackFrameData*, CallstackFrameIdHash, CallstackFrameIdCompare>& GetCallstackFrameMap() { return m_data.callstackFrameMap; }
#ifndef TRACY_NO_STATISTICS
const VarArray<CallstackFrameId>& GetParentCallstack( uint32_t idx ) const { return *m_data.parentCallstackPayload[idx]; }
const CallstackFrameData* GetParentCallstackFrame( const CallstackFrameId& ptr ) const;
@@ -665,6 +667,8 @@ public:
void CacheSourceFiles();
StringLocation StoreString(const char* str, size_t sz);
private:
void Network();
void Exec();
@@ -892,7 +896,6 @@ private:
uint32_t GetSingleStringIdx();
uint32_t GetSecondStringIdx();
StringLocation StoreString( const char* str, size_t sz );
const ContextSwitch* const GetContextSwitchDataImpl( uint64_t thread );
void CacheSource( const StringRef& str, const StringIdx& image = StringIdx() );
@@ -985,6 +988,7 @@ private:
bool m_combineSamples;
bool m_identifySamples = false;
bool m_inconsistentSamples;
bool m_allowStringModification = false;
short_ptr<GpuCtxData> m_gpuCtxMap[256];
uint32_t m_pendingCallstackId = 0;