tracy/common
Bartosz Taudul a56c47a6a0 Store thread handle in a thread local variable.
This saves us a non-inlineable function call. Thread local block is
accessed anyway, since we need to get the token, so we already have the
pointer and don't need to get it a second time (which is done inside
Windows' GetCurrentThreadId()). We also don't need to store the thread
id in ScopedZone anymore, as it was a micro-optimization to save us the
second GetThreadHandle() call.

This change has a measurable effect of reducing enqueue time from ~10 to
~8 ns.

A further optimization would be to completely skip thread handle
retrieval during zone capture and do it instead on retrieval of data
from the queue. Since each thread has its own producer ("token"), the
thread handle should be accessible during the dequeue operation. This is
a much more invasive change, that would require a) modification of the
queue, b) additional processing of dequeued data to inject the thread
handle.
2019-06-24 19:19:47 +02:00
..
tracy_benaphore.h Use standard naming for try_lock() in NonRecursiveBenaphore. 2018-08-20 21:37:55 +02:00
tracy_lz4.cpp Update LZ4 to 1.9.1. 2019-05-01 16:53:48 +02:00
tracy_lz4.hpp Update LZ4 to 1.9.1. 2019-05-01 16:53:48 +02:00
tracy_lz4hc.cpp Update LZ4 to 1.9.1. 2019-05-01 16:53:48 +02:00
tracy_lz4hc.hpp Update LZ4 to 1.9.1. 2019-05-01 16:53:48 +02:00
tracy_sema.h Correctly forward declare Win32 functions 2018-07-13 23:39:58 +02:00
TracyAlign.hpp MemRead() uses const pointer. 2018-07-11 01:33:27 +02:00
TracyAlloc.hpp Improve fixes for warnings as per request 2018-06-30 15:36:06 +02:00
TracyApi.h Clean up imported functions in multi-dll projects. 2019-06-07 19:50:08 +03:00
TracyColor.hpp Provide tracy color list in default client header. 2017-11-25 15:33:10 +01:00
TracyForceInline.hpp Fix force_inline on gcc/clang. 2018-04-21 19:22:27 +02:00
TracyMutex.hpp Use the fastest mutex available. 2018-07-14 00:39:01 +02:00
TracyProtocol.hpp Send current time in on-demand welcome message. 2019-06-21 19:39:41 +02:00
TracyQueue.hpp Frame image may need flipping. 2019-06-12 15:28:32 +02:00
TracySocket.cpp Can't read negative number of bytes. 2019-06-22 14:08:48 +02:00
TracySocket.hpp Can't read negative number of bytes. 2019-06-22 14:08:48 +02:00
TracySystem.cpp Clean up imported functions in multi-dll projects. 2019-06-07 19:50:08 +03:00
TracySystem.hpp Store thread handle in a thread local variable. 2019-06-24 19:19:47 +02:00