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

455 Commits

Author SHA1 Message Date
Bartosz Taudul 1625a45c31 On ARM64 use ISB to yield CPU in spinlocks.
https://github.com/rust-lang/rust/commit/c064b6560b7ce0adeb9bbf5d7dcf12b1acb0c807
2022-06-23 01:15:55 +02:00
Graydon Hoare e862799797 Support TRACY_NO_ISA_EXTENSIONS build flag. 2022-05-19 23:40:33 -07:00
Bartosz Taudul 0a432ed349 Ignore ld.mold not found error during detection. 2022-05-05 02:40:00 +02:00
Bartosz Taudul aa2bbfe5f9 Transfer executable image name in source file queries. 2022-05-01 14:30:18 +02:00
Bartosz Taudul 31b3212f76 The mold linker is not recognized by gcc. 2022-04-29 19:13:16 +02:00
Bartosz Taudul 3bc42faeb3 Fix clang test. 2022-04-29 19:13:09 +02:00
Bartosz Taudul 7d80c088fc Use mold for even faster linking. 2022-04-29 19:12:43 +02:00
Bartosz Taudul afd4cdec63 LTO + lld wants the compiler to be clang. 2022-04-27 02:33:22 +02:00
Bartosz Taudul b10c83f358 Use lld linker, if available. 2022-04-27 02:17:16 +02:00
Bartosz Taudul 066c266df9 Add missing includes. 2022-04-26 22:01:09 +02:00
Bartosz Taudul 95187c94e9 Bump protocol to simplify IsQueryPrio(). 2022-04-18 13:39:49 +02:00
Dave Rigby 31e4bef135 pthread_setname_np takes 1 arg on macOS
pthread_setname_np() can only set the name of the current thread on
macOS, so only pass a single name argument.

Fixes build break on macOS 12.2 with _GNU_SOURCE defined.
2022-02-28 16:07:12 +00:00
Balazs Kovacsics a0a56eaf9e Move TRACY_UWP define to own header 2022-02-10 20:26:45 +01:00
Balazs Kovacsics 10b3d7ad82 Fix compiling TracyClient.cpp on UWP with undefined TRACY_ENABLE 2022-02-09 18:25:04 +01:00
Bartosz Taudul 8089040e64 CallTrace() is no longer present. 2022-01-01 17:35:01 +01:00
Bartosz Taudul f5bfb47ec1 Fix line endings. 2022-01-01 17:02:05 +01:00
Bartosz Taudul d88bf2c7a8 Separate message type for context switch callstack samples. 2021-12-21 14:05:07 +01:00
Bartosz Taudul 5768486ac0 Add support for compiling assembly files. 2021-12-21 12:22:43 +01:00
Bartosz Taudul 20f8c8b8a4 Add IdentifySamples flag to the protocol.
On Windows there is no way to distinguish callstack data coming from random
sampling and from context switches. Each callstack timestamp has to be matched
against the context switch data in order to decide its origin. This is
obviously non-trivial.

On some other platforms, the origin information may be available right away,
in which case the process of matching against the context switch data, which
possibly includes postponing callstacks for processing in the future, may be
completely omitted.
2021-12-04 14:50:25 +01:00
Bartosz Taudul 4bde9022e1 Properly acknowledge unavailable symbol code. 2021-11-25 22:44:56 +01:00
Bartosz Taudul 47ea2a222d Add new metadata message, not for wire transfer. 2021-11-25 22:24:17 +01:00
Bartosz Taudul 0427904d4a Fix zone validation thread piggybacking. 2021-11-04 22:50:55 +01:00
Bartosz Taudul fceb065329 Fiber name transport. 2021-11-03 18:57:30 +01:00
Bartosz Taudul 229d547e91 Add fiber support on client side. 2021-11-02 00:11:09 +01:00
Bartosz Taudul 2b9265cc40 Move symbol resolution to a separate thread. 2021-10-22 22:25:09 +02:00
Bartosz Taudul e2610b1483 Add space for piggy-backing symbol data transfer. 2021-10-22 22:17:09 +02:00
Bartosz Taudul a1511a39bd Delta-encode code information pointers. 2021-10-16 16:29:06 +02:00
Bartosz Taudul 5ccf369919 Implement callstack serialization. 2021-10-10 16:14:17 +02:00
Bartosz Taudul a421083e58 Crash reports may be serialized. 2021-10-10 15:58:24 +02:00
Bartosz Taudul 082255f940 Messages may now use serialized queue. 2021-10-10 15:54:21 +02:00
Bartosz Taudul 5835011d0f Allow serialized zone validation. 2021-10-09 15:50:09 +02:00
Bartosz Taudul 13acec38f7 Use the possibly-synchronous macros in C++ zones. 2021-10-09 14:58:33 +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 fe7db6db4e Send symbol address in code information message. 2021-06-19 19:07:56 +02:00
Bartosz Taudul 2f7d79adba No _alloca() on cygwin. 2021-06-16 00:52:12 +02:00
Bartosz Taudul 697ec4372e Set combine samples flag on win32. 2021-06-15 01:32:18 +02:00
Bartosz Taudul 06dcdd342f Combine flags in welcome message. 2021-06-15 01:26:50 +02:00
Bartosz Taudul 004681b02b Merge remote-tracking branch 'origin/master' into hw 2021-06-14 23:54:34 +02:00
Bartosz Taudul d07db80b44 Fix rpmalloc init for shared libraries. 2021-06-13 12:15:36 +02:00
Bartosz Taudul 5b7cd06840 Don't init rpmalloc, if we know it has been done already. 2021-06-10 01:48:11 +02:00
Bartosz Taudul 7889d33044 Add fast versions of tracy_malloc/tracy_free. 2021-06-10 01:18:03 +02:00
Bartosz Taudul bb0f5025b2 Also ignore "atomic" header. 2021-06-09 02:14:01 +02:00
Bartosz Taudul 9c2ea8a71f Specify minimum length of subframe skip in one place. 2021-06-09 02:13:00 +02:00
Bartosz Taudul 854613f210 Ignore atomic_base.h implementation. 2021-06-09 02:05:44 +02:00
Bartosz Taudul b281ce9c0e Add missing include. 2021-06-04 15:01:50 +02:00
Bartosz Taudul 2765be92fb Sample time for hardware samples. 2021-06-04 12:50:55 +02:00
Bartosz Taudul b7c5939bb8 Merge remote-tracking branch 'origin/master' into hw 2021-06-02 01:12:28 +02:00
Bartosz Taudul 3da84d1579 Hide rpmalloc init behind thread local boolean. 2021-05-31 22:38: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