mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Revert to non-shared mutex for data lock.
The main change here is that the UI will be unresponsive when a trace is being saved when there's no capture being performed. Note that the UI was always frozen during saving if the capture was live, due to how starvation is prevented by the locks.
This commit is contained in:
@@ -233,7 +233,7 @@ private:
|
||||
|
||||
struct DataBlock
|
||||
{
|
||||
std::shared_mutex lock;
|
||||
std::mutex lock;
|
||||
StringDiscovery<FrameData*> frames;
|
||||
FrameData* framesBase;
|
||||
Vector<GpuCtxData*> gpuData;
|
||||
@@ -413,7 +413,7 @@ public:
|
||||
uint32_t GetCpuId() const { return m_data.cpuId; }
|
||||
const char* GetCpuManufacturer() const { return m_data.cpuManufacturer; }
|
||||
|
||||
std::shared_mutex& GetDataLock() { return m_data.lock; }
|
||||
std::mutex& GetDataLock() { return m_data.lock; }
|
||||
size_t GetFrameCount( const FrameData& fd ) const { return fd.frames.size(); }
|
||||
size_t GetFullFrameCount( const FrameData& fd ) const;
|
||||
int64_t GetLastTime() const { return m_data.lastTime; }
|
||||
|
||||
Reference in New Issue
Block a user