mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Implement FindMatchingZone(..)
Sets m_compare to the matched index. It supports multiple flags. It can be run by comparing function name, source file, line number, and any combination thereof. When searching for a match, we do 3 runs, quitting out if any of them succeed. 1. Look for zone with same function same, source file, line number. 2. Look for zone with same function same, source file. 3. Look for zone with same function same.
This commit is contained in:
@@ -251,6 +251,7 @@ private:
|
||||
uint64_t GetZoneThread( const ZoneEvent& zone ) const;
|
||||
uint64_t GetZoneThread( const GpuEvent& zone ) const;
|
||||
const GpuCtxData* GetZoneCtx( const GpuEvent& zone ) const;
|
||||
bool FindMatchingZone( int prev0, int prev1, int flags );
|
||||
const ZoneEvent* FindZoneAtTime( uint64_t thread, int64_t time ) const;
|
||||
uint64_t GetFrameNumber( const FrameData& fd, int i, uint64_t offset ) const;
|
||||
const char* GetFrameText( const FrameData& fd, int i, uint64_t ftime, uint64_t offset ) const;
|
||||
@@ -447,6 +448,13 @@ private:
|
||||
NeedsJoin
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
FindMatchingZoneFlagDefault = 0,
|
||||
FindMatchingZoneFlagSourceFile = (1 << 0),
|
||||
FindMatchingZoneFlagLineNum = (1 << 1),
|
||||
};
|
||||
|
||||
std::atomic<SaveThreadState> m_saveThreadState { SaveThreadState::Inert };
|
||||
std::thread m_saveThread;
|
||||
std::atomic<size_t> m_srcFileBytes { 0 };
|
||||
|
||||
Reference in New Issue
Block a user