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
Bartosz Taudul
46b75c5a19
Only enable tracy-internal GetThreadHandle if tracy is enabled.
2019-06-24 19:18:52 +02:00
Bartosz Taudul
fadf8e3e0a
Can't read negative number of bytes.
...
This completely ignores error handling, which probably should be added.
The code behavior doesn't change, as the existing comparisons and
asserts already promoted the signed value to unsigned.
2019-06-22 14:08:48 +02:00
Bartosz Taudul
fd9fc880a6
Send current time in on-demand welcome message.
2019-06-21 19:39:41 +02:00
Bartosz Taudul
48df667a37
Resolve client host name using DNS.
...
This operation is blocking and should be made asynchronous.
2019-06-21 19:27:41 +02:00
Bartosz Taudul
5309e6d94a
Broadcast client activity time.
2019-06-18 20:46:12 +02:00
Bartosz Taudul
0e5a7263d9
Define broadcast message, add versioning.
2019-06-18 20:26:40 +02:00
Bartosz Taudul
12e44fc605
Missing include.
2019-06-17 19:51:58 +02:00
Bartosz Taudul
e0bbb41976
Add UDP listen socket and IP address wrapper.
2019-06-17 19:23:43 +02:00
Bartosz Taudul
de058d2a0d
Don't hardcode broadcast port.
2019-06-17 18:37:34 +02:00
Bartosz Taudul
40e517594b
Add UDP broadcast socket.
2019-06-17 02:24:55 +02:00
Bartosz Taudul
ab4e99229d
Indicate whether client is running on apple shitware.
2019-06-13 14:05:15 +02:00
Bartosz Taudul
37d1457b44
Frame image may need flipping.
2019-06-12 15:28:32 +02:00
Rokas K. (rku)
c4e05b6264
Merged in rokups/tracy/dllimport-cleanup (pull request #36 )
...
Clean up imported functions in multi-dll projects.
Approved-by: Till Rathmann <till.rathmann@gmx.de>
2019-06-11 15:04:34 +00:00
Bartosz Taudul
2bc7a9bd30
Close listen socket in destructor.
2019-06-09 18:14:26 +02:00
Bartosz Taudul
784c4da53a
Include frame offset in frame image message.
2019-06-07 20:09:29 +02:00
Rokas Kupstys
9bd1037347
Clean up imported functions in multi-dll projects.
2019-06-07 19:50:08 +03:00
Bartosz Taudul
e5bb6011c5
Frame image transfer prototype.
2019-06-06 21:39:54 +02:00
Bartosz Taudul
efc54babe3
Transfer of colored messages.
2019-05-10 20:17:44 +02:00
Bartosz Taudul
98eaacec90
Update LZ4 to 1.9.1.
2019-05-01 16:53:48 +02:00
Bartosz Taudul
82dad3fb97
Use proper type.
2019-04-01 20:43:42 +02:00
Bartosz Taudul
d0d5184c04
Set options for proper socket.
2019-04-01 20:14:00 +02:00
Bartosz Taudul
687915299a
Don't try to set socket options on invalid socket.
2019-04-01 20:08:27 +02:00
Bartosz Taudul
c07c6d11b7
Define server query packet.
2019-04-01 19:21:53 +02:00
Bartosz Taudul
57cd6d3ed5
Allow retrieval of socket send buffer size.
2019-04-01 18:50:37 +02:00
Bartosz Taudul
d229c1bc1b
Send native callstack along with allocated callstack.
2019-03-05 02:42:50 +01:00
Bartosz Taudul
bef31ba073
Separate message for zone begin with alloc src loc and callstack.
2019-03-03 18:05:03 +01:00
Bartosz Taudul
e3c31e4a4e
Send callstack alloc payload.
2019-03-03 18:05:03 +01:00
Bartosz Taudul
b8501956f9
Lua callstack sending.
2019-03-03 18:04:02 +01:00
Bartosz Taudul
2c16bdd538
Don't go out of tracy namespace.
2019-03-03 01:59:24 +01:00
Bartosz Taudul
81c2515199
Bump protocol version.
2019-02-21 23:25:43 +01:00
Bartosz Taudul
9f4f5bcb63
CPU usage retrieval.
2019-02-21 22:45:53 +01:00
Bartosz Taudul
ef5e30056e
Implement delayed initialization of the profiler.
...
Enabled on osx, ios.
2019-02-19 20:43:30 +01:00
Bartosz Taudul
d560f7a203
Cosmetics.
2019-02-19 19:36:30 +01:00
Bartosz Taudul
3f914834b7
Hide rest of statics.
2019-02-19 19:33:37 +01:00
Bartosz Taudul
7f11260bf0
Handle dropped connection during handshake.
2019-02-12 01:41:09 +01:00
Bartosz Taudul
c7e64bb8a8
Replace select() with poll().
2019-02-10 15:45:23 +01:00
Bartosz Taudul
1585be7ff3
Rearrange Socket to reduce struct size.
2019-01-29 21:56:10 +01:00
Bartosz Taudul
ddad475c19
Make it possible to store multiple frames at single frame address.
2019-01-20 19:11:48 +01:00
Rokas Kupstys
36c76456f7
Fix mistakes from MingW support commit.
2019-01-19 15:03:43 +02:00
Rokas Kupstys
8157e3a0b3
Fix builds with MingW.
2019-01-19 13:53:10 +02:00
Bartosz Taudul
a2fd09d938
Add zone validation queue item.
2019-01-14 22:36:54 +01:00
Bartosz Taudul
0b816ce0b7
Add lock termination event.
2018-12-16 20:46:33 +01:00
Bartosz Taudul
61ac0b8afc
Send lock creation time.
2018-12-16 20:33:18 +01:00
Bartosz Taudul
42360f50b0
Update lz4 to 1.8.3.
2018-09-13 01:52:16 +02:00
Bartosz Taudul
9211ce42da
Non-on-demand client is only able to handle one connection.
2018-09-09 19:42:06 +02:00
Bartosz Taudul
984a711666
Send protocol version to verify handshake.
2018-09-09 19:28:53 +02:00
Bartosz Taudul
270072b09e
Require shibboleth match at start of connection.
2018-09-09 18:26:53 +02:00
Bartosz Taudul
f55f2858c4
Raw socket read function.
2018-09-09 18:24:58 +02:00
Bartosz Taudul
560fc34ae6
No pthread_setcancelstate on Android.
2018-09-07 17:21:44 +02:00
Bartosz Taudul
0f0528ca3d
Add LZ4HC.
2018-08-26 16:23:34 +02:00
Bartosz Taudul
8b3895473d
Gag inconsequential MSVC warnings in TracySocket.
...
Fix your API!
2018-08-22 16:29:15 +02:00
Bartosz Taudul
afee61a2cf
Use standard naming for try_lock() in NonRecursiveBenaphore.
2018-08-20 21:37:55 +02:00
Bartosz Taudul
3b526b074e
Send crash report.
2018-08-20 02:23:55 +02:00
Bartosz Taudul
366ea35593
Allow crash event reporting.
...
When crash happens there's no longer anything to profile -- don't wait
for unfinished zones to finish before sending client terminate
confirmation.
2018-08-20 01:03:16 +02:00
Bartosz Taudul
bd76f4cd10
Send host info in welcome message.
2018-08-19 18:19:12 +02:00
Bartosz Taudul
716166bc3a
Expose InitWinSock().
2018-08-19 18:15:46 +02:00
Bartosz Taudul
9d051cf5ee
Add support for discontinuous frames.
2018-08-05 02:15:54 +02:00
Bartosz Taudul
9b4348b497
Handle frame name queries.
2018-08-04 21:10:45 +02:00
Bartosz Taudul
23dfc2e3fc
Multiple frame sets support.
2018-08-04 21:10:45 +02:00
Bartosz Taudul
922882d3b0
Add name field to frame mark message.
2018-08-04 15:03:47 +02:00
Till Rathmann
4968717313
Fixed compiler warning about unused variable in release builds.
2018-08-02 11:45:15 +02:00
Till Rathmann
3b302315f9
Fixed __ANDROID_API__ < 21 build and FD_SET usage.
2018-08-01 19:18:40 +02:00
Till Rathmann
37d5736bf5
Fixed compiler warnings.
2018-08-01 14:07:30 +02:00
Till Rathmann
dd042619e9
Support for multi-DLL projects.
2018-07-31 12:06:04 +02:00
Arvid Gerstmann
dfe3285252
Merged in Leandros99/tracy/pr-1 (pull request #11 )
...
Implement pthread_getname_np alternative if it's not available
2018-07-24 11:57:21 +00:00
Arvid Gerstmann
69dac3f611
Fix accessing the thread id on Android
2018-07-24 13:43:25 +02:00
Rokas Kupstys
01df5aa840
Fix targetting lower windows versions when using W10 SDK that is older than redstone2.
2018-07-19 11:08:41 +03:00
Rokas Kupstys
d290e04d45
Fix build when targeting earlier windows versions by defining _WIN32_WINNT.
2018-07-17 20:15:27 +03:00
Bartosz Taudul
3799e0da43
Infer socket readiness from select() return value.
2018-07-16 01:50:21 +02:00