1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

281 Commits

Author SHA1 Message Date
Bartosz Taudul 65d146ddca Allow checking if socket is valid. 2019-12-19 17:23:40 +01:00
Bartosz Taudul 4eaa3d90dd Thread ids are no longer pthread_t. 2019-12-13 15:57:08 +01:00
Bartosz Taudul d4f4b73d56 Move socket buffer size from header to source file. 2019-12-08 23:14:48 +01:00
Bartosz Taudul 712403e9fd Transfer, display, save CPU topology data. 2019-11-29 22:41:41 +01:00
Bartosz Taudul 4551553eb4 Implement setting client parameters from server. 2019-11-25 23:59:48 +01:00
Bartosz Taudul 3e4913dc8a Reuse socket address also on BSD. 2019-11-21 20:41:57 +01:00
Bartosz Taudul 3c4a7463b8 Retrieve proper thread ids on BSD. 2019-11-21 02:29:17 +01:00
Bartosz Taudul 3282360382 Bind on both IPv6 and IPv4 on BSD. 2019-11-21 02:03:32 +01:00
Bartosz Taudul a9cd5b331f BSD needs netinet/in.h for struct sockaddr_in and friends. 2019-11-21 01:28:48 +01:00
Bartosz Taudul 31e1558467 Use standard includes. 2019-11-15 20:17:55 +01:00
Bartosz Taudul 8286b0b72f Plumbing for message call stacks. 2019-11-14 23:40:41 +01:00
Bartosz Taudul 0f6101b19a Fix mingw/cygwin thread name setter/getter. 2019-11-07 18:58:08 +01:00
Bartosz Taudul 3abdd7cdaf Remove LZ4 include from TracyProtocol.hpp. 2019-11-06 01:30:20 +01:00
Bartosz Taudul 6015c964a9 Enable LZ4 fast decompression loop on MSVC. 2019-11-05 22:00:13 +01:00
Bartosz Taudul 6bbf273581 Partial header inclusion cleanup. 2019-11-05 20:09:40 +01:00
Bartosz Taudul 907574e637 Allow remote plot configuration. 2019-11-05 17:45:19 +01:00
Bartosz Taudul 106411e1f6 Add missing freeaddrinfo(). 2019-10-27 13:39:01 +01:00
Bartosz Taudul 0f2503d334 Send time deltas in GPU time events. 2019-10-25 19:52:01 +02:00
Bartosz Taudul 8fa5188176 Send delta times for context switches. 2019-10-25 19:13:11 +02:00
Bartosz Taudul ba61a9ed84 Transfer time deltas, not absolute times.
This change significantly reduces network bandwidth requirements.

Implemented for:
- CPU zones,
- GPU zones,
- locks,
- plots,
- memory events.
2019-10-24 00:06:41 +02:00
Bartosz Taudul 707f113bda Add missing NOMINMAX definitions. 2019-10-10 20:29:06 +02:00
Bartosz Taudul 0f68e1e981 Send thread id in GPU zone end message.
We don't care about OpenGL zone thread ids, so the identifier is zeroed.
2019-09-23 16:06:14 +02:00
Bartosz Taudul 82cd667b30 Allow specifying network port in server. 2019-09-21 15:43:01 +02:00
Bartosz Taudul e13cbf52fd Allow changing tracy port in client. 2019-09-21 15:11:15 +02:00
Bartosz Taudul fd245bb5df Fix includes for gettid() on android. 2019-08-19 15:09:47 +02:00
Bartosz Taudul 20e8a5ecc8 Create tid to pid mapping. 2019-08-17 22:32:41 +02:00
Bartosz Taudul 678e942e9f Transfer PID of profiled program. 2019-08-17 22:19:04 +02:00
Bartosz Taudul 414f903cc5 Collect thread wakeup data. 2019-08-17 17:05:29 +02:00
Bartosz Taudul e975c4d7bf Also retrieve external thread names. 2019-08-16 19:49:16 +02:00
Bartosz Taudul fe7f56b022 Implement retrieval of external process names. 2019-08-16 19:22:23 +02:00
Bartosz Taudul 71b54dd48a Always collect thread names.
This fixes an issue when a thread was destroyed before its name could be
retrieved.
2019-08-14 16:52:04 +02:00
Bartosz Taudul 92b6da7cc2 SetThreadName() only works on the current thread.
This breaking change is required, because kernel trace facilities use
kernel thread ids, which are inaccessible from the pthread_t level.
2019-08-14 02:22:45 +02:00
Bartosz Taudul 339b7fd2a6 Use kernel thread ids on linux. 2019-08-14 01:57:36 +02:00
Bartosz Taudul 8925d026a9 Cosmetics. 2019-08-14 01:57:36 +02:00
Bartosz Taudul 73cbf2eead Use windows thread ids on cygwin. 2019-08-13 16:22:58 +02:00
Bartosz Taudul 90d26cb1b6 Collect and send context switch events. 2019-08-13 02:35:32 +02:00
Bartosz Taudul 8aa0be39d5 Drop support for CPU id queries. 2019-08-12 23:05:34 +02:00
Bartosz Taudul d6f32a0839 Serialize lock processing.
This makes is much easier to process on the server and opens new
optimization possibilities. It also fixes theoretical problems, which
may be caused by invalid ordering of events with the same timestamp.
2019-08-12 13:51:01 +02:00
Rokas Kupstys b391e4c21a Fix multiple build errors when compiling with MinGW. 2019-08-04 15:49:46 +03:00
Bartosz Taudul 12969ee497 Track thread context.
This change exploits the fact that events are processed in batches
originating from a single thread. A single message changing thread
context is enough to handle multiple messages, as opposed to inclusion
of thread identifier in each message.
2019-08-02 20:18:08 +02:00
Bartosz Taudul a4e7a341c0 Proper handling of disconnect request. 2019-08-01 23:14:09 +02:00
Bartosz Taudul a6a3f45810 Fill in thread id during dequeue, not during enqueue. 2019-07-30 01:15:14 +02:00
Bartosz Taudul dc49f2f76a Move DXT1 index conversion to server. 2019-07-19 21:46:58 +02:00
Bartosz Taudul 60d2384a6a Allow sending application information messages. 2019-07-12 18:34:46 +02:00
Bartosz Taudul 94b470ba66 Chomp newline from end of thread string. 2019-07-03 16:12:37 +02:00
Bartosz Taudul bb35f9a897 Compress frame images in a separate thread. 2019-06-27 13:24:35 +02:00
Bartosz Taudul 8ce41b3543 Proper init order of thread local thread handle. 2019-06-26 19:32:52 +02:00
Bartosz Taudul a8cb257474 Revert "Resolve client host name using DNS."
This reverts commit 48df667a37.
2019-06-26 17:58:23 +02:00
Bartosz Taudul bc7f2c49c8 GetThreadHandle() might be used by application's code. 2019-06-25 15:44:49 +02:00
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