Commit Graph

263 Commits

Author SHA1 Message Date
Bartosz Taudul
8428ede59d
Retrieve kernel symbols on Windows. 2021-11-25 23:12:41 +01:00
Bartosz Taudul
4bde9022e1
Properly acknowledge unavailable symbol code. 2021-11-25 22:44:56 +01:00
Bartosz Taudul
e8fb2abb2a
Dispatch kernel code retrieval. 2021-11-25 22:27:35 +01:00
Bartosz Taudul
a203eb5aef
Adapt to SPSCQueue interface. 2021-11-14 18:50:59 +01:00
Bartosz Taudul
765561de81
Serialize continuous frame events. 2021-11-05 01:13:24 +01:00
Nathan Day
4fece233d9 Added unused parameters when TRACY_HAS_CALLSTACK is undefined 2021-11-04 15:24:58 +00:00
Bartosz Taudul
229d547e91
Add fiber support on client side. 2021-11-02 00:11:09 +01:00
Bartosz Taudul
02ce9b7d8b
Extract symbol queue item handling. 2021-10-23 01:35:01 +02:00
Bartosz Taudul
2b9265cc40
Move symbol resolution to a separate thread. 2021-10-22 22:25:09 +02:00
Bartosz Taudul
b4cfb1f2d5
Add SPSC symbol queue. 2021-10-22 22:22:27 +02:00
Bartosz Taudul
6d490ffd28
Revert "Use SPSC queue for frame images."
This reverts commit 02e76faff7.

Let's not limit frame image reporting to just one thread.
2021-10-20 23:18:03 +02:00
Bartosz Taudul
ce2a7d6741
Offset field is not used. 2021-10-20 22:57:23 +02:00
Bartosz Taudul
02e76faff7
Use SPSC queue for frame images. 2021-10-20 22:57:23 +02:00
Bartosz Taudul
5ccf369919
Implement callstack serialization. 2021-10-10 16:14:17 +02:00
Bartosz Taudul
082255f940
Messages may now use serialized queue. 2021-10-10 15:54:21 +02:00
Bartosz Taudul
2cea5bc5b2
Add C API async-or-sync queue macros. 2021-10-09 15:50:30 +02:00
Bartosz Taudul
2d5d4293a9
Move thread context check to a separate function. 2021-10-09 15:16:36 +02:00
Bartosz Taudul
6411b35d68
Provide macros for async-or-sync queue insertion.
If fibers are enabled, then some events which were traditionally stored in
async queues will have to be serialized. These macros provide the needed
infrastructure for this.
2021-10-09 14:55:32 +02:00
Bartosz Taudul
250ef2cf6e
Change thread id size from 64 to 32 bits.
Both Windows and Linux use 32-bit thread identifiers. MacOS has a 64-bit
counter, but in practice it will never overflow during profiling and no false
aliasing will happen.

These changes are only done client-side and in the network protocol. The
server still uses 64-bit thread identifiers, to enable virtual threads, etc.
2021-10-08 00:42:52 +02:00
Bartosz Taudul
07bc665d8c
Drop support for Cygwin. 2021-10-07 23:28:40 +02:00
Bartosz Taudul
924224501e
Remove exception handler during profiler destruction. 2021-07-25 11:48:27 +02:00
Bartosz Taudul
61c9e8e6d8
Crash handler may be not installed. 2021-07-25 11:46:20 +02:00
Bartosz Taudul
54fa21bcbb
Restore original signal handlers on profiler exit. 2021-07-25 11:40:22 +02:00
Bartosz Taudul
b0fc0d5dcc
Check if rpmalloc has to be initialized before each operation.
The C++11 spec states in [basic.stc.thread] thread storage duration:

2. A variable with thread storage duration shall be initialized before its
   first odr-use (3.2) and, if constructed, shall be destroyed on thread exit.

Previously Tracy relied on the TLS data being initialized:
- During thread creation (MSVC).
- Or during first use in a thread, but the initialization was performed for
  the whole TLS block.

It seems that new compilers are more granular with how they perform the
initialization, hence rpmalloc init has to be checked before each allocation,
as it cannot be "folded" into, for example, initialization of the profiler
itself.
2021-05-31 02:31:42 +02:00
Bartosz Taudul
eb7d220eea
Added support for TRACY_NO_FRAME_IMAGE define. 2021-04-29 20:55:16 +02:00
Bartosz Taudul
c288a7903b
Make {Startup,Shutdown}Profiler() signatures consistent. 2021-03-08 02:39:51 +01:00
Bartosz Taudul
9cfc36f92e Preserve valid order of server query acknowledgements. 2021-02-07 20:53:20 +01:00
Bartosz Taudul
ad2062fb40 Last-resort source code transfer from client to server. 2021-02-04 00:45:00 +01:00
Bartosz Taudul
0ce113a96c Check mtime of profiled executable. 2021-01-31 17:45:31 +01:00
Bartosz Taudul
33ca38b581 Add a define for fallback timer usage. 2021-01-28 18:49:17 +01:00
Bartosz Taudul
b58358f81f Cosmetics. 2021-01-28 18:49:12 +01:00
Bartosz Taudul
6b276a1a64 Init rpmalloc thread-local data when sending messages.
There was a possibility of having uninitialized TLS block there, if the first
thing done in a thread was sending a message.
2021-01-27 02:14:23 +01:00
Bartosz Taudul
90de2d2f73 Support queuing serial items with callstack. 2021-01-15 22:11:34 +01:00
Bartosz Taudul
d4c0d4fbb7 Rename CallstackMemory to CallstackSerial. 2021-01-15 20:49:39 +01:00
Felipe Oliveira Carvalho
c9865c5f95 Fix integer type warnings
This is necessary to compile Tracy-instrumented code in
codebases built with -Werror.
2020-11-19 16:36:01 +01:00
Bartosz Taudul
bd31e3d2d6 Send callstacks before sending events they belong to. 2020-09-29 16:40:19 +02:00
Bartosz Taudul
4db092437c Add support for custom allocator tracking to client. 2020-09-24 01:31:23 +02:00
Bartosz Taudul
9258e2ced0 Restore TSC usage on Linux. 2020-08-13 01:41:05 +02:00
Bartosz Taudul
649994706b Use clock monotonic raw on Linux.
Because Linux kernel interfaces are fucking stupid.
2020-08-12 16:49:30 +02:00
Bartosz Taudul
b76726c597 No need for lean callstack, callstack memory messages. 2020-07-26 14:23:03 +02:00
Bartosz Taudul
b7af9a0860 Reduce frame images frame index to 32 bit. 2020-07-26 13:46:05 +02:00
Bartosz Taudul
c0b73c248f Add second single string transfer. 2020-07-26 01:47:49 +02:00
Bartosz Taudul
e91950f006 Send single string for messages. 2020-07-26 01:35:52 +02:00
Bartosz Taudul
81d5a8db5e Implement transport of single string data.
In most cases only one string is sent per message and no pointer
tracking is needed.

This is only plumbing work, no changes to messages have been made yet.
2020-07-26 01:35:51 +02:00
Bartosz Taudul
02e7893c75 Preserve messages size. 2020-07-21 20:58:58 +02:00
Bartosz Taudul
e4fbf60668 Add SendString() with length parameter. 2020-07-21 20:58:58 +02:00
Bartosz Taudul
2bef3629b7
Merge pull request #74 from avoroshilov/manual-lifetime
Manual lifetime management for Multi-DLL
2020-07-19 12:06:11 +02:00
Bartosz Taudul
b8df7a1302 Expose m_isConnected in non-on-demand builds. 2020-07-16 11:22:06 +02:00
Andrey Voroshilov
cbfb19816b Merge remote-tracking branch 'tracy/master' into manual-lifetime
# Conflicts:
#	AUTHORS
2020-07-13 01:49:11 -07:00
Andrey Voroshilov
4c397ebe1e Fixing some of the copy-paste errors 2020-07-12 10:12:50 -07:00