2018-02-13 13:57:47 +00:00
|
|
|
#ifndef __TRACYWORKER_HPP__
|
|
|
|
#define __TRACYWORKER_HPP__
|
|
|
|
|
|
|
|
#include <atomic>
|
2018-03-18 19:15:45 +00:00
|
|
|
#include <limits>
|
2019-05-28 17:21:53 +00:00
|
|
|
#include <shared_mutex>
|
2018-04-21 12:18:13 +00:00
|
|
|
#include <stdexcept>
|
2018-02-13 13:57:47 +00:00
|
|
|
#include <string>
|
|
|
|
#include <thread>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "../common/tracy_lz4.hpp"
|
|
|
|
#include "../common/TracyForceInline.hpp"
|
|
|
|
#include "../common/TracyQueue.hpp"
|
2019-04-01 17:17:18 +00:00
|
|
|
#include "../common/TracyProtocol.hpp"
|
2018-02-13 13:57:47 +00:00
|
|
|
#include "../common/TracySocket.hpp"
|
|
|
|
#include "tracy_flat_hash_map.hpp"
|
|
|
|
#include "TracyEvent.hpp"
|
|
|
|
#include "TracySlab.hpp"
|
2018-08-04 14:33:03 +00:00
|
|
|
#include "TracyStringDiscovery.hpp"
|
2018-06-19 19:15:36 +00:00
|
|
|
#include "TracyVarArray.hpp"
|
2018-02-13 13:57:47 +00:00
|
|
|
|
|
|
|
namespace tracy
|
|
|
|
{
|
|
|
|
|
|
|
|
class FileRead;
|
|
|
|
class FileWrite;
|
|
|
|
|
2018-04-20 14:03:09 +00:00
|
|
|
namespace EventType
|
|
|
|
{
|
|
|
|
enum Type : uint32_t
|
|
|
|
{
|
2019-08-12 22:56:57 +00:00
|
|
|
Locks = 1 << 0,
|
|
|
|
Messages = 1 << 1,
|
|
|
|
Plots = 1 << 2,
|
|
|
|
Memory = 1 << 3,
|
|
|
|
FrameImages = 1 << 4,
|
|
|
|
ContextSwitches = 1 << 5,
|
2018-04-20 14:03:09 +00:00
|
|
|
|
2019-08-12 22:56:57 +00:00
|
|
|
None = 0,
|
|
|
|
All = std::numeric_limits<uint32_t>::max()
|
2018-04-20 14:03:09 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-04-21 12:18:13 +00:00
|
|
|
struct UnsupportedVersion : public std::exception
|
|
|
|
{
|
|
|
|
UnsupportedVersion( int version ) : version( version ) {}
|
|
|
|
int version;
|
|
|
|
};
|
|
|
|
|
2019-08-12 10:16:48 +00:00
|
|
|
struct LegacyVersion : public std::exception
|
|
|
|
{
|
|
|
|
LegacyVersion( int version ) : version ( version ) {}
|
|
|
|
int version;
|
|
|
|
};
|
|
|
|
|
2018-07-28 15:59:17 +00:00
|
|
|
struct LoadProgress
|
|
|
|
{
|
2018-07-29 14:56:46 +00:00
|
|
|
enum Stage
|
|
|
|
{
|
|
|
|
Initialization,
|
|
|
|
Locks,
|
|
|
|
Messages,
|
|
|
|
Zones,
|
|
|
|
GpuZones,
|
|
|
|
Plots,
|
|
|
|
Memory,
|
2019-06-06 21:40:37 +00:00
|
|
|
CallStacks,
|
2019-08-12 22:56:57 +00:00
|
|
|
FrameImages,
|
|
|
|
ContextSwitches
|
2018-07-29 14:56:46 +00:00
|
|
|
};
|
|
|
|
|
2018-07-28 18:13:06 +00:00
|
|
|
LoadProgress() : total( 0 ), progress( 0 ), subTotal( 0 ), subProgress( 0 ) {}
|
|
|
|
|
|
|
|
std::atomic<uint64_t> total;
|
|
|
|
std::atomic<uint64_t> progress;
|
|
|
|
std::atomic<uint64_t> subTotal;
|
|
|
|
std::atomic<uint64_t> subProgress;
|
2018-07-28 15:59:17 +00:00
|
|
|
};
|
|
|
|
|
2018-02-13 13:57:47 +00:00
|
|
|
class Worker
|
|
|
|
{
|
2018-07-21 18:26:13 +00:00
|
|
|
public:
|
2018-03-18 19:45:49 +00:00
|
|
|
#pragma pack( 1 )
|
|
|
|
struct ZoneThreadData
|
|
|
|
{
|
|
|
|
ZoneEvent* zone;
|
|
|
|
uint16_t thread;
|
|
|
|
};
|
|
|
|
#pragma pack()
|
|
|
|
|
2018-07-21 18:26:13 +00:00
|
|
|
private:
|
2018-03-18 19:08:57 +00:00
|
|
|
struct SourceLocationZones
|
|
|
|
{
|
2018-03-18 19:45:49 +00:00
|
|
|
Vector<ZoneThreadData> zones;
|
2019-03-14 00:15:19 +00:00
|
|
|
int64_t min = std::numeric_limits<int64_t>::max();
|
|
|
|
int64_t max = std::numeric_limits<int64_t>::min();
|
|
|
|
int64_t total = 0;
|
2019-03-14 00:23:37 +00:00
|
|
|
double sumSq = 0;
|
2019-03-14 00:15:19 +00:00
|
|
|
int64_t selfMin = std::numeric_limits<int64_t>::max();
|
|
|
|
int64_t selfMax = std::numeric_limits<int64_t>::min();
|
|
|
|
int64_t selfTotal = 0;
|
2018-03-18 19:08:57 +00:00
|
|
|
};
|
|
|
|
|
2019-03-03 15:37:21 +00:00
|
|
|
struct CallstackFrameIdHash
|
|
|
|
{
|
2019-03-03 16:54:00 +00:00
|
|
|
size_t operator()( const CallstackFrameId& id ) const { return id.data; }
|
2019-03-03 15:37:21 +00:00
|
|
|
typedef tracy::power_of_two_hash_policy hash_policy;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CallstackFrameIdCompare
|
|
|
|
{
|
2019-03-03 16:54:00 +00:00
|
|
|
bool operator()( const CallstackFrameId& lhs, const CallstackFrameId& rhs ) const { return lhs.data == rhs.data; }
|
2019-03-03 15:37:21 +00:00
|
|
|
};
|
|
|
|
|
2019-03-03 16:34:56 +00:00
|
|
|
struct RevFrameHash
|
|
|
|
{
|
2019-03-03 16:54:00 +00:00
|
|
|
size_t operator()( const CallstackFrameData* data ) const
|
2019-03-03 16:34:56 +00:00
|
|
|
{
|
|
|
|
size_t hash = data->size;
|
|
|
|
for( uint8_t i=0; i<data->size; i++ )
|
|
|
|
{
|
|
|
|
const auto& v = data->data[i];
|
|
|
|
hash = ( ( hash << 5 ) + hash ) ^ size_t( v.line );
|
|
|
|
hash = ( ( hash << 5 ) + hash ) ^ size_t( v.file.__data );
|
|
|
|
hash = ( ( hash << 5 ) + hash ) ^ size_t( v.name.__data );
|
|
|
|
}
|
|
|
|
return hash;
|
|
|
|
}
|
|
|
|
typedef tracy::power_of_two_hash_policy hash_policy;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct RevFrameComp
|
|
|
|
{
|
2019-03-03 16:54:00 +00:00
|
|
|
bool operator()( const CallstackFrameData* lhs, const CallstackFrameData* rhs ) const
|
2019-03-03 16:34:56 +00:00
|
|
|
{
|
|
|
|
if( lhs->size != rhs->size ) return false;
|
|
|
|
for( uint8_t i=0; i<lhs->size; i++ )
|
|
|
|
{
|
|
|
|
if( memcmp( lhs->data + i, rhs->data + i, sizeof( CallstackFrame ) ) != 0 ) return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-02-13 13:57:47 +00:00
|
|
|
struct DataBlock
|
|
|
|
{
|
2019-08-14 18:16:11 +00:00
|
|
|
DataBlock()
|
|
|
|
: zonesCnt( 0 )
|
|
|
|
, lastTime( 0 )
|
|
|
|
, frameOffset( 0 )
|
|
|
|
, threadLast( std::numeric_limits<uint64_t>::max(), 0 )
|
|
|
|
, threadDataLast( std::numeric_limits<uint64_t>::max(), nullptr )
|
|
|
|
, ctxSwitchLast( std::numeric_limits<uint64_t>::max(), nullptr )
|
|
|
|
{}
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2019-05-28 17:21:53 +00:00
|
|
|
std::shared_mutex lock;
|
2018-08-04 17:47:09 +00:00
|
|
|
StringDiscovery<FrameData*> frames;
|
|
|
|
FrameData* framesBase;
|
2018-02-13 13:57:47 +00:00
|
|
|
Vector<GpuCtxData*> gpuData;
|
|
|
|
Vector<MessageData*> messages;
|
2018-08-04 14:33:03 +00:00
|
|
|
StringDiscovery<PlotData*> plots;
|
2018-02-13 13:57:47 +00:00
|
|
|
Vector<ThreadData*> threads;
|
2018-04-01 00:03:34 +00:00
|
|
|
MemData memory;
|
2018-02-13 13:57:47 +00:00
|
|
|
uint64_t zonesCnt;
|
|
|
|
int64_t lastTime;
|
2018-07-10 20:39:41 +00:00
|
|
|
uint64_t frameOffset;
|
2018-02-13 13:57:47 +00:00
|
|
|
|
|
|
|
flat_hash_map<uint64_t, const char*, nohash<uint64_t>> strings;
|
|
|
|
Vector<const char*> stringData;
|
2019-02-12 19:23:14 +00:00
|
|
|
flat_hash_map<charutil::StringKey, uint32_t, charutil::StringKey::HasherPOT, charutil::StringKey::Comparator> stringMap;
|
2018-02-13 13:57:47 +00:00
|
|
|
flat_hash_map<uint64_t, const char*, nohash<uint64_t>> threadNames;
|
|
|
|
|
|
|
|
flat_hash_map<uint64_t, SourceLocation, nohash<uint64_t>> sourceLocation;
|
|
|
|
Vector<SourceLocation*> sourceLocationPayload;
|
|
|
|
flat_hash_map<SourceLocation*, uint32_t, SourceLocationHasher, SourceLocationComparator> sourceLocationPayloadMap;
|
2018-03-04 15:32:51 +00:00
|
|
|
Vector<uint64_t> sourceLocationExpand;
|
2018-03-18 11:55:54 +00:00
|
|
|
#ifndef TRACY_NO_STATISTICS
|
2018-03-18 19:08:57 +00:00
|
|
|
flat_hash_map<int32_t, SourceLocationZones, nohash<int32_t>> sourceLocationZones;
|
2018-04-30 01:54:09 +00:00
|
|
|
bool sourceLocationZonesReady;
|
2018-07-29 12:16:13 +00:00
|
|
|
#else
|
|
|
|
flat_hash_map<int32_t, uint64_t> sourceLocationZonesCnt;
|
2018-03-18 11:55:54 +00:00
|
|
|
#endif
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2019-03-03 15:50:18 +00:00
|
|
|
flat_hash_map<VarArray<CallstackFrameId>*, uint32_t, VarArrayHasherPOT<CallstackFrameId>, VarArrayComparator<CallstackFrameId>> callstackMap;
|
|
|
|
Vector<VarArray<CallstackFrameId>*> callstackPayload;
|
|
|
|
flat_hash_map<CallstackFrameId, CallstackFrameData*, CallstackFrameIdHash, CallstackFrameIdCompare> callstackFrameMap;
|
2019-03-03 16:34:56 +00:00
|
|
|
flat_hash_map<CallstackFrameData*, CallstackFrameId, RevFrameHash, RevFrameComp> revFrameMap;
|
2018-06-19 19:15:36 +00:00
|
|
|
|
2019-03-16 01:09:50 +00:00
|
|
|
flat_hash_map<uint32_t, LockMap*, nohash<uint32_t>> lockMap;
|
2018-03-18 19:45:22 +00:00
|
|
|
|
|
|
|
flat_hash_map<uint64_t, uint16_t, nohash<uint64_t>> threadMap;
|
|
|
|
Vector<uint64_t> threadExpand;
|
2018-04-30 23:29:25 +00:00
|
|
|
std::pair<uint64_t, uint16_t> threadLast;
|
2019-08-03 12:35:01 +00:00
|
|
|
std::pair<uint64_t, ThreadData*> threadDataLast;
|
2018-07-22 14:05:50 +00:00
|
|
|
|
2019-03-26 20:41:44 +00:00
|
|
|
Vector<Vector<ZoneEvent*>> zoneChildren;
|
|
|
|
Vector<Vector<GpuEvent*>> gpuChildren;
|
2018-08-20 00:07:31 +00:00
|
|
|
|
2019-03-26 21:06:00 +00:00
|
|
|
Vector<Vector<ZoneEvent*>> zoneVectorCache;
|
|
|
|
|
2019-06-06 19:39:54 +00:00
|
|
|
Vector<FrameImage*> frameImage;
|
2019-07-12 16:30:45 +00:00
|
|
|
Vector<StringRef> appInfo;
|
2019-06-06 19:39:54 +00:00
|
|
|
|
2019-03-26 20:41:44 +00:00
|
|
|
CrashEvent crashEvent;
|
2019-08-12 22:13:50 +00:00
|
|
|
|
|
|
|
flat_hash_map<uint64_t, ContextSwitch*, nohash<uint64_t>> ctxSwitch;
|
2019-08-14 18:16:11 +00:00
|
|
|
std::pair<uint64_t, ContextSwitch*> ctxSwitchLast;
|
2018-02-13 13:57:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct MbpsBlock
|
|
|
|
{
|
2019-04-01 17:55:37 +00:00
|
|
|
MbpsBlock() : mbps( 64 ), compRatio( 1.0 ), queue( 0 ) {}
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2019-05-28 17:21:53 +00:00
|
|
|
std::shared_mutex lock;
|
2018-02-13 13:57:47 +00:00
|
|
|
std::vector<float> mbps;
|
|
|
|
float compRatio;
|
2019-04-01 17:55:37 +00:00
|
|
|
size_t queue;
|
2018-02-13 13:57:47 +00:00
|
|
|
};
|
|
|
|
|
2018-06-21 23:07:25 +00:00
|
|
|
enum class NextCallstackType
|
|
|
|
{
|
2018-06-21 23:56:32 +00:00
|
|
|
Zone,
|
2018-08-20 00:07:31 +00:00
|
|
|
Gpu,
|
|
|
|
Crash
|
2018-06-21 23:07:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct NextCallstack
|
|
|
|
{
|
|
|
|
NextCallstackType type;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
ZoneEvent* zone;
|
2018-06-21 23:56:32 +00:00
|
|
|
GpuEvent* gpu;
|
2018-06-21 23:07:25 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-01-14 22:22:31 +00:00
|
|
|
struct FailureData
|
|
|
|
{
|
|
|
|
uint64_t thread;
|
|
|
|
int32_t srcloc;
|
|
|
|
};
|
|
|
|
|
2018-02-13 13:57:47 +00:00
|
|
|
public:
|
2019-01-14 22:22:31 +00:00
|
|
|
enum class Failure
|
|
|
|
{
|
|
|
|
None,
|
2019-01-15 17:42:15 +00:00
|
|
|
ZoneStack,
|
2019-01-15 23:45:48 +00:00
|
|
|
ZoneEnd,
|
2019-01-16 00:17:01 +00:00
|
|
|
ZoneText,
|
|
|
|
ZoneName,
|
2019-01-15 17:56:26 +00:00
|
|
|
MemFree,
|
2019-02-28 18:32:42 +00:00
|
|
|
FrameEnd,
|
2019-06-09 11:44:53 +00:00
|
|
|
FrameImageIndex,
|
|
|
|
FrameImageTwice,
|
2019-01-15 17:42:15 +00:00
|
|
|
|
|
|
|
NUM_FAILURES
|
2019-01-14 22:22:31 +00:00
|
|
|
};
|
|
|
|
|
2018-02-13 13:57:47 +00:00
|
|
|
Worker( const char* addr );
|
2018-04-20 14:03:09 +00:00
|
|
|
Worker( FileRead& f, EventType::Type eventMask = EventType::All );
|
2018-02-13 13:57:47 +00:00
|
|
|
~Worker();
|
|
|
|
|
|
|
|
const std::string& GetAddr() const { return m_addr; }
|
|
|
|
const std::string& GetCaptureName() const { return m_captureName; }
|
2018-08-28 22:57:11 +00:00
|
|
|
const std::string& GetCaptureProgram() const { return m_captureProgram; }
|
|
|
|
uint64_t GetCaptureTime() const { return m_captureTime; }
|
2018-08-19 16:24:43 +00:00
|
|
|
const std::string& GetHostInfo() const { return m_hostInfo; }
|
2018-02-13 13:57:47 +00:00
|
|
|
int64_t GetDelay() const { return m_delay; }
|
|
|
|
int64_t GetResolution() const { return m_resolution; }
|
|
|
|
|
2019-05-28 17:21:53 +00:00
|
|
|
std::shared_mutex& GetDataLock() { return m_data.lock; }
|
2018-08-04 17:47:09 +00:00
|
|
|
size_t GetFrameCount( const FrameData& fd ) const { return fd.frames.size(); }
|
2018-09-01 10:38:12 +00:00
|
|
|
size_t GetFullFrameCount( const FrameData& fd ) const;
|
2018-08-04 17:51:50 +00:00
|
|
|
int64_t GetTimeBegin() const { return GetFrameBegin( *m_data.framesBase, 0 ); }
|
2018-02-13 13:57:47 +00:00
|
|
|
int64_t GetLastTime() const { return m_data.lastTime; }
|
|
|
|
uint64_t GetZoneCount() const { return m_data.zonesCnt; }
|
2018-08-08 17:21:53 +00:00
|
|
|
uint64_t GetLockCount() const;
|
|
|
|
uint64_t GetPlotCount() const;
|
2019-08-12 22:29:09 +00:00
|
|
|
uint64_t GetContextSwitchCount() const;
|
2019-08-14 18:26:55 +00:00
|
|
|
bool HasContextSwitches() const { return !m_data.ctxSwitch.empty(); }
|
2018-08-14 14:36:25 +00:00
|
|
|
uint64_t GetSrcLocCount() const { return m_data.sourceLocationPayload.size() + m_data.sourceLocation.size(); }
|
|
|
|
uint64_t GetCallstackPayloadCount() const { return m_data.callstackPayload.size() - 1; }
|
|
|
|
uint64_t GetCallstackFrameCount() const { return m_data.callstackFrameMap.size(); }
|
2019-06-22 12:11:45 +00:00
|
|
|
uint32_t GetFrameImageCount() const { return (uint32_t)m_data.frameImage.size(); }
|
2018-07-10 20:39:41 +00:00
|
|
|
uint64_t GetFrameOffset() const { return m_data.frameOffset; }
|
2018-08-04 17:47:09 +00:00
|
|
|
const FrameData* GetFramesBase() const { return m_data.framesBase; }
|
2018-08-04 18:58:49 +00:00
|
|
|
const Vector<FrameData*>& GetFrames() const { return m_data.frames.Data(); }
|
2019-08-14 18:16:11 +00:00
|
|
|
const ContextSwitch* const GetContextSwitchData( uint64_t thread )
|
|
|
|
{
|
|
|
|
if( m_data.ctxSwitchLast.first == thread ) return m_data.ctxSwitchLast.second;
|
|
|
|
return GetContextSwitchDataImpl( thread );
|
|
|
|
}
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2018-08-04 17:47:09 +00:00
|
|
|
int64_t GetFrameTime( const FrameData& fd, size_t idx ) const;
|
|
|
|
int64_t GetFrameBegin( const FrameData& fd, size_t idx ) const;
|
|
|
|
int64_t GetFrameEnd( const FrameData& fd, size_t idx ) const;
|
2019-06-06 19:48:01 +00:00
|
|
|
const FrameImage* GetFrameImage( const FrameData& fd, size_t idx ) const;
|
2019-06-22 12:05:18 +00:00
|
|
|
std::pair<int, int> GetFrameRange( const FrameData& fd, int64_t from, int64_t to );
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2019-03-16 01:09:50 +00:00
|
|
|
const flat_hash_map<uint32_t, LockMap*, nohash<uint32_t>>& GetLockMap() const { return m_data.lockMap; }
|
2018-02-13 13:57:47 +00:00
|
|
|
const Vector<MessageData*>& GetMessages() const { return m_data.messages; }
|
|
|
|
const Vector<GpuCtxData*>& GetGpuData() const { return m_data.gpuData; }
|
2018-08-04 14:33:03 +00:00
|
|
|
const Vector<PlotData*>& GetPlots() const { return m_data.plots.Data(); }
|
2018-02-13 13:57:47 +00:00
|
|
|
const Vector<ThreadData*>& GetThreadData() const { return m_data.threads; }
|
2018-04-01 18:25:09 +00:00
|
|
|
const MemData& GetMemData() const { return m_data.memory; }
|
2019-06-11 22:14:44 +00:00
|
|
|
const Vector<FrameImage*>& GetFrameImages() const { return m_data.frameImage; }
|
2019-07-12 16:39:07 +00:00
|
|
|
const Vector<StringRef>& GetAppInfo() const { return m_data.appInfo; }
|
2018-06-19 23:18:59 +00:00
|
|
|
|
2019-03-03 15:50:18 +00:00
|
|
|
const VarArray<CallstackFrameId>& GetCallstack( uint32_t idx ) const { return *m_data.callstackPayload[idx]; }
|
|
|
|
const CallstackFrameData* GetCallstackFrame( const CallstackFrameId& ptr ) const;
|
2019-03-03 15:39:13 +00:00
|
|
|
uint64_t GetCanonicalPointer( const CallstackFrameId& id ) const;
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2019-03-26 20:41:44 +00:00
|
|
|
const CrashEvent& GetCrashEvent() const { return m_data.crashEvent; }
|
2018-08-20 00:23:29 +00:00
|
|
|
|
2018-03-18 01:53:00 +00:00
|
|
|
// Some zones may have incomplete timing data (only start time is available, end hasn't arrived yet).
|
|
|
|
// GetZoneEnd() will try to infer the end time by looking at child zones (parent zone can't end
|
|
|
|
// before its children have ended).
|
|
|
|
// GetZoneEndDirect() will only return zone's direct timing data, without looking at children.
|
2018-07-22 14:05:50 +00:00
|
|
|
int64_t GetZoneEnd( const ZoneEvent& ev );
|
2018-07-22 17:47:01 +00:00
|
|
|
int64_t GetZoneEnd( const GpuEvent& ev );
|
2018-03-24 01:00:20 +00:00
|
|
|
static tracy_force_inline int64_t GetZoneEndDirect( const ZoneEvent& ev ) { return ev.end >= 0 ? ev.end : ev.start; }
|
|
|
|
static tracy_force_inline int64_t GetZoneEndDirect( const GpuEvent& ev ) { return ev.gpuEnd >= 0 ? ev.gpuEnd : ev.gpuStart; }
|
2018-03-18 01:53:00 +00:00
|
|
|
|
2018-02-13 13:57:47 +00:00
|
|
|
const char* GetString( uint64_t ptr ) const;
|
|
|
|
const char* GetString( const StringRef& ref ) const;
|
|
|
|
const char* GetString( const StringIdx& idx ) const;
|
|
|
|
const char* GetThreadString( uint64_t id ) const;
|
|
|
|
const SourceLocation& GetSourceLocation( int32_t srcloc ) const;
|
|
|
|
|
2019-02-10 15:45:19 +00:00
|
|
|
const char* GetZoneName( const SourceLocation& srcloc ) const;
|
2018-06-29 13:14:20 +00:00
|
|
|
const char* GetZoneName( const ZoneEvent& ev ) const;
|
|
|
|
const char* GetZoneName( const ZoneEvent& ev, const SourceLocation& srcloc ) const;
|
|
|
|
const char* GetZoneName( const GpuEvent& ev ) const;
|
|
|
|
const char* GetZoneName( const GpuEvent& ev, const SourceLocation& srcloc ) const;
|
|
|
|
|
2019-03-26 20:41:44 +00:00
|
|
|
tracy_force_inline const Vector<ZoneEvent*>& GetZoneChildren( int32_t idx ) const { return m_data.zoneChildren[idx]; }
|
|
|
|
tracy_force_inline const Vector<GpuEvent*>& GetGpuChildren( int32_t idx ) const { return m_data.gpuChildren[idx]; }
|
2018-07-22 14:05:50 +00:00
|
|
|
|
2018-12-18 15:52:29 +00:00
|
|
|
std::vector<int32_t> GetMatchingSourceLocation( const char* query, bool ignoreCase ) const;
|
2018-03-24 13:48:52 +00:00
|
|
|
|
2018-03-18 11:55:54 +00:00
|
|
|
#ifndef TRACY_NO_STATISTICS
|
2018-03-18 19:20:24 +00:00
|
|
|
const SourceLocationZones& GetZonesForSourceLocation( int32_t srcloc ) const;
|
2018-03-24 13:48:52 +00:00
|
|
|
const flat_hash_map<int32_t, SourceLocationZones, nohash<int32_t>>& GetSourceLocationZones() const { return m_data.sourceLocationZones; }
|
2018-04-30 01:54:09 +00:00
|
|
|
bool AreSourceLocationZonesReady() const { return m_data.sourceLocationZonesReady; }
|
2018-03-18 11:55:54 +00:00
|
|
|
#endif
|
2018-03-04 15:52:45 +00:00
|
|
|
|
2018-05-03 16:43:51 +00:00
|
|
|
tracy_force_inline uint16_t CompressThread( uint64_t thread )
|
|
|
|
{
|
|
|
|
if( m_data.threadLast.first == thread ) return m_data.threadLast.second;
|
|
|
|
return CompressThreadReal( thread );
|
|
|
|
}
|
2018-03-24 00:31:58 +00:00
|
|
|
tracy_force_inline uint64_t DecompressThread( uint16_t thread ) const { assert( thread < m_data.threadExpand.size() ); return m_data.threadExpand[thread]; }
|
2018-03-18 19:45:22 +00:00
|
|
|
|
2019-05-28 17:21:53 +00:00
|
|
|
std::shared_mutex& GetMbpsDataLock() { return m_mbpsData.lock; }
|
2018-02-13 13:57:47 +00:00
|
|
|
const std::vector<float>& GetMbpsData() const { return m_mbpsData.mbps; }
|
|
|
|
float GetCompRatio() const { return m_mbpsData.compRatio; }
|
2019-04-01 17:55:37 +00:00
|
|
|
size_t GetSendQueueSize() const { return m_mbpsData.queue; }
|
2018-02-13 13:57:47 +00:00
|
|
|
|
|
|
|
bool HasData() const { return m_hasData.load( std::memory_order_acquire ); }
|
|
|
|
bool IsConnected() const { return m_connected.load( std::memory_order_relaxed ); }
|
2018-03-24 13:43:57 +00:00
|
|
|
bool IsDataStatic() const { return !m_thread.joinable(); }
|
2019-06-02 13:00:38 +00:00
|
|
|
bool IsBackgroundDone() const { return m_backgroundDone.load( std::memory_order_relaxed ); }
|
2018-02-13 13:57:47 +00:00
|
|
|
void Shutdown() { m_shutdown.store( true, std::memory_order_relaxed ); }
|
2019-08-01 21:14:09 +00:00
|
|
|
void Disconnect();
|
2018-02-13 13:57:47 +00:00
|
|
|
|
|
|
|
void Write( FileWrite& f );
|
2018-07-29 13:33:48 +00:00
|
|
|
int GetTraceVersion() const { return m_traceVersion; }
|
2018-09-09 17:28:53 +00:00
|
|
|
uint8_t GetHandshakeStatus() const { return m_handshake.load( std::memory_order_relaxed ); }
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2018-07-28 15:59:17 +00:00
|
|
|
static const LoadProgress& GetLoadProgress() { return s_loadProgress; }
|
2019-01-06 18:09:50 +00:00
|
|
|
int64_t GetLoadTime() const { return m_loadTime; }
|
2018-07-28 15:59:17 +00:00
|
|
|
|
2019-01-14 22:22:31 +00:00
|
|
|
void ClearFailure() { m_failure = Failure::None; }
|
|
|
|
Failure GetFailureType() const { return m_failure; }
|
|
|
|
const FailureData& GetFailureData() const { return m_failureData; }
|
2019-01-15 17:42:15 +00:00
|
|
|
static const char* GetFailureString( Failure failure );
|
2019-01-14 22:22:31 +00:00
|
|
|
|
2019-06-08 10:17:18 +00:00
|
|
|
const char* PackFrameImage( const char* image, uint16_t w, uint16_t h, uint32_t& csz );
|
|
|
|
const char* UnpackFrameImage( const FrameImage& image );
|
2019-06-27 15:16:23 +00:00
|
|
|
bool HasEtc1FrameImages() const;
|
2019-06-08 10:17:18 +00:00
|
|
|
|
2018-02-13 13:57:47 +00:00
|
|
|
private:
|
|
|
|
void Exec();
|
2019-04-01 16:52:32 +00:00
|
|
|
void Query( ServerQuery type, uint64_t data );
|
2019-06-09 13:58:56 +00:00
|
|
|
void QueryTerminate();
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2019-01-14 22:08:34 +00:00
|
|
|
tracy_force_inline bool DispatchProcess( const QueueItem& ev, char*& ptr );
|
|
|
|
tracy_force_inline bool Process( const QueueItem& ev );
|
2019-08-02 18:18:08 +00:00
|
|
|
tracy_force_inline void ProcessThreadContext( const QueueThreadContext& ev );
|
2018-02-13 13:57:47 +00:00
|
|
|
tracy_force_inline void ProcessZoneBegin( const QueueZoneBegin& ev );
|
2018-06-21 23:07:25 +00:00
|
|
|
tracy_force_inline void ProcessZoneBeginCallstack( const QueueZoneBegin& ev );
|
2018-02-13 13:57:47 +00:00
|
|
|
tracy_force_inline void ProcessZoneBeginAllocSrcLoc( const QueueZoneBegin& ev );
|
2019-03-03 16:47:26 +00:00
|
|
|
tracy_force_inline void ProcessZoneBeginAllocSrcLocCallstack( const QueueZoneBegin& ev );
|
2019-01-15 17:55:21 +00:00
|
|
|
tracy_force_inline void ProcessZoneEnd( const QueueZoneEnd& ev );
|
2019-01-14 21:56:10 +00:00
|
|
|
tracy_force_inline void ProcessZoneValidation( const QueueZoneValidation& ev );
|
2018-02-13 13:57:47 +00:00
|
|
|
tracy_force_inline void ProcessFrameMark( const QueueFrameMark& ev );
|
2018-08-05 00:09:59 +00:00
|
|
|
tracy_force_inline void ProcessFrameMarkStart( const QueueFrameMark& ev );
|
|
|
|
tracy_force_inline void ProcessFrameMarkEnd( const QueueFrameMark& ev );
|
2019-06-06 19:39:54 +00:00
|
|
|
tracy_force_inline void ProcessFrameImage( const QueueFrameImage& ev );
|
2018-02-13 13:57:47 +00:00
|
|
|
tracy_force_inline void ProcessZoneText( const QueueZoneText& ev );
|
2018-06-29 14:12:17 +00:00
|
|
|
tracy_force_inline void ProcessZoneName( const QueueZoneText& ev );
|
2018-02-13 13:57:47 +00:00
|
|
|
tracy_force_inline void ProcessLockAnnounce( const QueueLockAnnounce& ev );
|
2018-12-16 19:39:30 +00:00
|
|
|
tracy_force_inline void ProcessLockTerminate( const QueueLockTerminate& ev );
|
2018-02-13 13:57:47 +00:00
|
|
|
tracy_force_inline void ProcessLockWait( const QueueLockWait& ev );
|
|
|
|
tracy_force_inline void ProcessLockObtain( const QueueLockObtain& ev );
|
|
|
|
tracy_force_inline void ProcessLockRelease( const QueueLockRelease& ev );
|
|
|
|
tracy_force_inline void ProcessLockSharedWait( const QueueLockWait& ev );
|
|
|
|
tracy_force_inline void ProcessLockSharedObtain( const QueueLockObtain& ev );
|
|
|
|
tracy_force_inline void ProcessLockSharedRelease( const QueueLockRelease& ev );
|
|
|
|
tracy_force_inline void ProcessLockMark( const QueueLockMark& ev );
|
|
|
|
tracy_force_inline void ProcessPlotData( const QueuePlotData& ev );
|
|
|
|
tracy_force_inline void ProcessMessage( const QueueMessage& ev );
|
|
|
|
tracy_force_inline void ProcessMessageLiteral( const QueueMessage& ev );
|
2019-05-10 18:17:44 +00:00
|
|
|
tracy_force_inline void ProcessMessageColor( const QueueMessageColor& ev );
|
|
|
|
tracy_force_inline void ProcessMessageLiteralColor( const QueueMessageColor& ev );
|
2019-07-12 16:30:45 +00:00
|
|
|
tracy_force_inline void ProcessMessageAppInfo( const QueueMessage& ev );
|
2018-02-13 13:57:47 +00:00
|
|
|
tracy_force_inline void ProcessGpuNewContext( const QueueGpuNewContext& ev );
|
|
|
|
tracy_force_inline void ProcessGpuZoneBegin( const QueueGpuZoneBegin& ev );
|
2018-06-21 23:56:32 +00:00
|
|
|
tracy_force_inline void ProcessGpuZoneBeginCallstack( const QueueGpuZoneBegin& ev );
|
2018-02-13 13:57:47 +00:00
|
|
|
tracy_force_inline void ProcessGpuZoneEnd( const QueueGpuZoneEnd& ev );
|
|
|
|
tracy_force_inline void ProcessGpuTime( const QueueGpuTime& ev );
|
2018-04-01 00:03:34 +00:00
|
|
|
tracy_force_inline void ProcessMemAlloc( const QueueMemAlloc& ev );
|
2018-07-11 23:35:32 +00:00
|
|
|
tracy_force_inline bool ProcessMemFree( const QueueMemFree& ev );
|
2018-06-19 16:52:45 +00:00
|
|
|
tracy_force_inline void ProcessMemAllocCallstack( const QueueMemAlloc& ev );
|
|
|
|
tracy_force_inline void ProcessMemFreeCallstack( const QueueMemFree& ev );
|
|
|
|
tracy_force_inline void ProcessCallstackMemory( const QueueCallstackMemory& ev );
|
2018-06-21 23:15:49 +00:00
|
|
|
tracy_force_inline void ProcessCallstack( const QueueCallstack& ev );
|
2019-03-05 01:04:45 +00:00
|
|
|
tracy_force_inline void ProcessCallstackAlloc( const QueueCallstackAlloc& ev );
|
2019-01-20 18:11:48 +00:00
|
|
|
tracy_force_inline void ProcessCallstackFrameSize( const QueueCallstackFrameSize& ev );
|
2018-06-19 23:07:09 +00:00
|
|
|
tracy_force_inline void ProcessCallstackFrame( const QueueCallstackFrame& ev );
|
2018-08-20 00:07:31 +00:00
|
|
|
tracy_force_inline void ProcessCrashReport( const QueueCrashReport& ev );
|
2019-02-21 21:45:39 +00:00
|
|
|
tracy_force_inline void ProcessSysTime( const QueueSysTime& ev );
|
2019-08-12 22:13:50 +00:00
|
|
|
tracy_force_inline void ProcessContextSwitch( const QueueContextSwitch& ev );
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2018-06-21 23:07:25 +00:00
|
|
|
tracy_force_inline void ProcessZoneBeginImpl( ZoneEvent* zone, const QueueZoneBegin& ev );
|
2019-03-03 16:47:26 +00:00
|
|
|
tracy_force_inline void ProcessZoneBeginAllocSrcLocImpl( ZoneEvent* zone, const QueueZoneBegin& ev );
|
2018-06-21 23:56:32 +00:00
|
|
|
tracy_force_inline void ProcessGpuZoneBeginImpl( GpuEvent* zone, const QueueGpuZoneBegin& ev );
|
2018-06-21 23:07:25 +00:00
|
|
|
|
2019-01-14 22:22:31 +00:00
|
|
|
void ZoneStackFailure( uint64_t thread, const ZoneEvent* ev );
|
2019-01-15 23:45:48 +00:00
|
|
|
void ZoneEndFailure( uint64_t thread );
|
2019-01-16 00:17:01 +00:00
|
|
|
void ZoneTextFailure( uint64_t thread );
|
|
|
|
void ZoneNameFailure( uint64_t thread );
|
2019-01-15 17:56:26 +00:00
|
|
|
void MemFreeFailure( uint64_t thread );
|
2019-02-28 18:32:42 +00:00
|
|
|
void FrameEndFailure();
|
2019-06-09 11:44:53 +00:00
|
|
|
void FrameImageIndexFailure();
|
|
|
|
void FrameImageTwiceFailure();
|
2019-01-14 22:22:31 +00:00
|
|
|
|
2018-02-13 13:57:47 +00:00
|
|
|
tracy_force_inline void CheckSourceLocation( uint64_t ptr );
|
|
|
|
void NewSourceLocation( uint64_t ptr );
|
|
|
|
tracy_force_inline uint32_t ShrinkSourceLocation( uint64_t srcloc );
|
|
|
|
uint32_t NewShrinkedSourceLocation( uint64_t srcloc );
|
|
|
|
|
2018-04-28 13:49:12 +00:00
|
|
|
tracy_force_inline void MemAllocChanged( int64_t time );
|
|
|
|
void CreateMemAllocPlot();
|
2018-04-29 11:40:04 +00:00
|
|
|
void ReconstructMemAllocPlot();
|
2018-04-28 13:49:12 +00:00
|
|
|
|
2018-02-13 13:57:47 +00:00
|
|
|
void InsertMessageData( MessageData* msg, uint64_t thread );
|
|
|
|
|
2019-08-03 12:35:01 +00:00
|
|
|
ThreadData* NoticeThreadReal( uint64_t thread );
|
2018-02-13 13:57:47 +00:00
|
|
|
ThreadData* NewThread( uint64_t thread );
|
2019-08-03 12:35:01 +00:00
|
|
|
ThreadData* NoticeThread( uint64_t thread )
|
|
|
|
{
|
|
|
|
if( m_data.threadDataLast.first == thread ) return m_data.threadDataLast.second;
|
|
|
|
return NoticeThreadReal( thread );
|
|
|
|
}
|
2018-02-13 13:57:47 +00:00
|
|
|
|
|
|
|
tracy_force_inline void NewZone( ZoneEvent* zone, uint64_t thread );
|
|
|
|
|
|
|
|
void InsertLockEvent( LockMap& lockmap, LockEvent* lev, uint64_t thread );
|
|
|
|
|
|
|
|
void CheckString( uint64_t ptr );
|
|
|
|
void CheckThreadString( uint64_t id );
|
|
|
|
|
|
|
|
void AddSourceLocation( const QueueSourceLocation& srcloc );
|
|
|
|
void AddSourceLocationPayload( uint64_t ptr, char* data, size_t sz );
|
|
|
|
|
|
|
|
void AddString( uint64_t ptr, char* str, size_t sz );
|
|
|
|
void AddThreadString( uint64_t id, char* str, size_t sz );
|
|
|
|
void AddCustomString( uint64_t ptr, char* str, size_t sz );
|
2019-06-06 19:39:54 +00:00
|
|
|
void AddFrameImageData( uint64_t ptr, char* data, size_t sz );
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2018-06-24 13:28:09 +00:00
|
|
|
tracy_force_inline void AddCallstackPayload( uint64_t ptr, char* data, size_t sz );
|
2019-03-03 16:34:56 +00:00
|
|
|
tracy_force_inline void AddCallstackAllocPayload( uint64_t ptr, char* data, size_t sz );
|
2018-06-19 19:15:36 +00:00
|
|
|
|
2018-02-13 13:57:47 +00:00
|
|
|
void InsertPlot( PlotData* plot, int64_t time, double val );
|
|
|
|
void HandlePlotName( uint64_t name, char* str, size_t sz );
|
2018-08-04 18:48:21 +00:00
|
|
|
void HandleFrameName( uint64_t name, char* str, size_t sz );
|
2018-04-01 00:03:34 +00:00
|
|
|
|
2018-02-13 13:57:47 +00:00
|
|
|
void HandlePostponedPlots();
|
|
|
|
|
|
|
|
StringLocation StoreString( char* str, size_t sz );
|
2018-04-30 23:29:25 +00:00
|
|
|
uint16_t CompressThreadReal( uint64_t thread );
|
2018-03-24 00:31:58 +00:00
|
|
|
uint16_t CompressThreadNew( uint64_t thread );
|
2019-08-14 18:16:11 +00:00
|
|
|
const ContextSwitch* const GetContextSwitchDataImpl( uint64_t thread );
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2018-12-30 22:06:03 +00:00
|
|
|
tracy_force_inline void ReadTimeline( FileRead& f, ZoneEvent* zone, uint16_t thread, int64_t& refTime );
|
|
|
|
tracy_force_inline void ReadTimelinePre042( FileRead& f, ZoneEvent* zone, uint16_t thread, int fileVer );
|
2019-08-12 17:18:17 +00:00
|
|
|
tracy_force_inline void ReadTimelinePre051( FileRead& f, ZoneEvent* zone, uint16_t thread, int64_t& refTime, int fileVer );
|
2019-01-03 19:09:45 +00:00
|
|
|
tracy_force_inline void ReadTimeline( FileRead& f, GpuEvent* zone, int64_t& refTime, int64_t& refGpuTime );
|
2019-02-16 22:04:34 +00:00
|
|
|
tracy_force_inline void ReadTimelinePre044( FileRead& f, GpuEvent* zone, int64_t& refTime, int64_t& refGpuTime, int fileVer );
|
2018-03-15 21:54:10 +00:00
|
|
|
|
2018-06-21 23:30:08 +00:00
|
|
|
tracy_force_inline void ReadTimelineUpdateStatistics( ZoneEvent* zone, uint16_t thread );
|
|
|
|
|
2018-12-30 22:06:03 +00:00
|
|
|
void ReadTimeline( FileRead& f, Vector<ZoneEvent*>& vec, uint16_t thread, uint64_t size, int64_t& refTime );
|
|
|
|
void ReadTimelinePre042( FileRead& f, Vector<ZoneEvent*>& vec, uint16_t thread, uint64_t size, int fileVer );
|
2019-08-12 17:18:17 +00:00
|
|
|
void ReadTimelinePre051( FileRead& f, Vector<ZoneEvent*>& vec, uint16_t thread, uint64_t size, int64_t& refTime, int fileVer );
|
2019-01-03 19:09:45 +00:00
|
|
|
void ReadTimeline( FileRead& f, Vector<GpuEvent*>& vec, uint64_t size, int64_t& refTime, int64_t& refGpuTime );
|
2019-02-16 22:04:34 +00:00
|
|
|
void ReadTimelinePre044( FileRead& f, Vector<GpuEvent*>& vec, uint64_t size, int64_t& refTime, int64_t& refGpuTime, int fileVer );
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2018-12-30 22:06:03 +00:00
|
|
|
void WriteTimeline( FileWrite& f, const Vector<ZoneEvent*>& vec, int64_t& refTime );
|
2019-01-03 19:09:45 +00:00
|
|
|
void WriteTimeline( FileWrite& f, const Vector<GpuEvent*>& vec, int64_t& refTime, int64_t& refGpuTime );
|
2018-02-13 13:57:47 +00:00
|
|
|
|
|
|
|
int64_t TscTime( int64_t tsc ) { return int64_t( tsc * m_timerMul ); }
|
|
|
|
int64_t TscTime( uint64_t tsc ) { return int64_t( tsc * m_timerMul ); }
|
|
|
|
|
|
|
|
Socket m_sock;
|
|
|
|
std::string m_addr;
|
|
|
|
|
2018-04-30 01:54:09 +00:00
|
|
|
std::thread m_thread;
|
2019-05-27 12:09:55 +00:00
|
|
|
std::atomic<bool> m_connected { false };
|
2018-02-13 13:57:47 +00:00
|
|
|
std::atomic<bool> m_hasData;
|
2019-05-27 12:09:55 +00:00
|
|
|
std::atomic<bool> m_shutdown { false };
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2019-06-02 13:00:38 +00:00
|
|
|
std::atomic<bool> m_backgroundDone { true };
|
2019-02-14 00:17:37 +00:00
|
|
|
std::thread m_threadBackground;
|
2018-04-30 01:54:09 +00:00
|
|
|
|
2018-02-13 13:57:47 +00:00
|
|
|
int64_t m_delay;
|
|
|
|
int64_t m_resolution;
|
|
|
|
double m_timerMul;
|
|
|
|
std::string m_captureName;
|
2018-08-28 22:57:11 +00:00
|
|
|
std::string m_captureProgram;
|
|
|
|
uint64_t m_captureTime;
|
2018-08-19 16:21:56 +00:00
|
|
|
std::string m_hostInfo;
|
2019-01-06 18:04:50 +00:00
|
|
|
bool m_terminate = false;
|
|
|
|
bool m_crashed = false;
|
2019-08-01 21:14:09 +00:00
|
|
|
bool m_disconnect = false;
|
2018-02-13 13:57:47 +00:00
|
|
|
LZ4_streamDecode_t* m_stream;
|
|
|
|
char* m_buffer;
|
|
|
|
int m_bufferOffset;
|
2018-07-11 23:21:04 +00:00
|
|
|
bool m_onDemand;
|
2019-06-13 12:15:17 +00:00
|
|
|
bool m_ignoreMemFreeFaults;
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2018-06-22 13:14:44 +00:00
|
|
|
GpuCtxData* m_gpuCtxMap[256];
|
2018-02-13 13:57:47 +00:00
|
|
|
flat_hash_map<uint64_t, StringLocation, nohash<uint64_t>> m_pendingCustomStrings;
|
2019-03-05 18:30:17 +00:00
|
|
|
uint64_t m_pendingCallstackPtr = 0;
|
|
|
|
uint32_t m_pendingCallstackId;
|
2018-02-13 13:57:47 +00:00
|
|
|
flat_hash_map<uint64_t, int32_t, nohash<uint64_t>> m_pendingSourceLocationPayload;
|
|
|
|
Vector<uint64_t> m_sourceLocationQueue;
|
|
|
|
flat_hash_map<uint64_t, uint32_t, nohash<uint64_t>> m_sourceLocationShrink;
|
|
|
|
flat_hash_map<uint64_t, ThreadData*, nohash<uint64_t>> m_threadMap;
|
2018-06-21 23:07:25 +00:00
|
|
|
flat_hash_map<uint64_t, NextCallstack, nohash<uint64_t>> m_nextCallstack;
|
2019-06-06 19:39:54 +00:00
|
|
|
flat_hash_map<uint64_t, void*, nohash<uint64_t>> m_pendingFrameImageData;
|
2018-02-13 13:57:47 +00:00
|
|
|
|
|
|
|
uint32_t m_pendingStrings;
|
|
|
|
uint32_t m_pendingThreads;
|
|
|
|
uint32_t m_pendingSourceLocation;
|
2018-06-20 21:42:00 +00:00
|
|
|
uint32_t m_pendingCallstackFrames;
|
2019-01-20 18:11:48 +00:00
|
|
|
uint8_t m_pendingCallstackSubframes;
|
|
|
|
|
|
|
|
CallstackFrameData* m_callstackFrameStaging;
|
|
|
|
uint64_t m_callstackFrameStagingPtr;
|
2019-03-03 16:34:56 +00:00
|
|
|
uint64_t m_callstackAllocNextIdx = 0;
|
2018-02-13 13:57:47 +00:00
|
|
|
|
2018-06-19 16:52:45 +00:00
|
|
|
uint64_t m_lastMemActionCallstack;
|
2018-06-19 20:08:47 +00:00
|
|
|
bool m_lastMemActionWasAlloc;
|
2018-06-19 16:52:45 +00:00
|
|
|
|
2018-02-13 13:57:47 +00:00
|
|
|
Slab<64*1024*1024> m_slab;
|
|
|
|
|
|
|
|
DataBlock m_data;
|
|
|
|
MbpsBlock m_mbpsData;
|
2018-07-28 15:59:17 +00:00
|
|
|
|
2018-07-29 13:33:48 +00:00
|
|
|
int m_traceVersion;
|
2019-05-27 12:09:55 +00:00
|
|
|
std::atomic<uint8_t> m_handshake { 0 };
|
2018-07-29 13:33:48 +00:00
|
|
|
|
2018-07-28 15:59:17 +00:00
|
|
|
static LoadProgress s_loadProgress;
|
2019-01-06 18:09:50 +00:00
|
|
|
int64_t m_loadTime;
|
2019-01-14 22:22:31 +00:00
|
|
|
|
|
|
|
Failure m_failure = Failure::None;
|
|
|
|
FailureData m_failureData;
|
2019-02-21 21:45:39 +00:00
|
|
|
|
|
|
|
PlotData* m_sysTimePlot = nullptr;
|
2019-04-01 17:17:18 +00:00
|
|
|
|
|
|
|
Vector<ServerQueryPacket> m_serverQueryQueue;
|
|
|
|
size_t m_serverQuerySpaceLeft;
|
2019-06-08 10:17:18 +00:00
|
|
|
|
2019-06-27 11:04:27 +00:00
|
|
|
flat_hash_map<uint64_t, int32_t> m_frameImageStaging;
|
2019-06-08 10:17:18 +00:00
|
|
|
char* m_frameImageBuffer = nullptr;
|
|
|
|
size_t m_frameImageBufferSize = 0;
|
2019-08-02 18:18:08 +00:00
|
|
|
|
|
|
|
uint64_t m_threadCtx = 0;
|
2018-02-13 13:57:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|