mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Keep atomics on separate cache lines.
This commit is contained in:
parent
ede90710e5
commit
8b56386ccd
@ -266,9 +266,9 @@ private:
|
||||
size_t m_offset;
|
||||
size_t m_lastBlock;
|
||||
|
||||
std::atomic<bool> m_signalSwitch;
|
||||
std::atomic<bool> m_signalAvailable;
|
||||
std::atomic<bool> m_exit;
|
||||
alignas(64) std::atomic<bool> m_signalSwitch;
|
||||
alignas(64) std::atomic<bool> m_signalAvailable;
|
||||
alignas(64) std::atomic<bool> m_exit;
|
||||
|
||||
std::thread m_decThread;
|
||||
|
||||
|
||||
@ -1349,7 +1349,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
||||
size_t bufsz = 0;
|
||||
char* outbuf = nullptr;
|
||||
size_t outsz = 0;
|
||||
std::atomic<State> state = Available;
|
||||
alignas(64) std::atomic<State> state = Available;
|
||||
};
|
||||
|
||||
// Leave one thread for file reader, second thread for dispatch (this thread)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user