Ivan Molodetskikh
16a148f0be
Replace __WORDSIZE with __SIZEOF_POINTER__
...
__WORDSIZE has been relocated from bits/reg.h (now an empty header) to
sys/reg.h in 2024:
https://git.musl-libc.org/cgit/musl/commit/?id=e709a6f07ade208ba513f9225222336f30c304b0
And in any case, it's a private definition. Let's use a common
documented define instead:
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
Fixes symbol resolution on musl (particularly, postmarketOS aarch64).
2026-07-06 18:57:31 +03:00
Bartosz Taudul
ba9388cd9f
Merge pull request #1404 from wolfpld/slomp/gl_query_result_no_wait
...
Possibly faster GL timestamp query result check
2026-06-30 21:03:40 +02:00
Ivan Molodetskikh
279f7ba0df
libbacktrace: Fix missing table assignment in RLE seq decode
...
Fixes segfault when decompressing mesa debuginfo on Aeryn.
2026-06-27 11:05:12 +03:00
Bartosz Taudul
0b120ba84f
Merge pull request #1415 from wolfpld/slomp/webgpu-logging
...
WebGPU: more informative errors
2026-06-26 23:09:58 +02:00
Marcos Slomp
2221138299
more informative errors
2026-06-26 10:40:48 -07:00
Ivan Molodetskikh
bd2106db68
libbacktrace: support compressed block with window descriptor
...
Some debuginfo on AerynOS has this format.
2026-06-26 10:46:33 +03:00
Ian Lance Taylor
99c13e53bf
libbacktrace: support compressed block with no sequences
...
* elf.c (elf_zstd_decompress_frame): Support a compressed block
with no sequences, only literals.
Fixes https://github.com/ianlancetaylor/libbacktrace/issues/164
2026-06-26 10:46:17 +03:00
Ian Lance Taylor
7fbe1d1345
libbacktrace: support multiple zstd frames
...
Based on patch by GitHub user ofats.
* elf.c (elf_zstd_decompress_frame): New static function,
broken out of elf_zstd_decompress.
(elf_zstd_decompress): Call elf_zstd_decompress_frame in a loop.
* zstdtest.c (test_large): Compress the file in chunks.
2026-06-26 10:41:29 +03:00
Ivan Molodetskikh
5745b489a2
callstack: Calculate end address from highest LOAD header
...
Headers aren't guaranteed to be sorted in final address order. For
example, from readelf -lW of a .so built with clang:
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
PHDR 0x000040 0x0000000000000040 0x0000000000000040 0x000230 0x000230 R 0x8
LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x5e8274 0x5e8274 R 0x1000
LOAD 0x5e8280 0x00000000005e9280 0x00000000005e9280 0x51e990 0x51e990 R E 0x1000
LOAD 0xb06c10 0x0000000000b08c10 0x0000000000b08c10 0x031628 0x0323f0 RW 0x1000
LOAD 0xb38240 0x0000000000b3b240 0x0000000000b3b240 0x009aa8 0x011c40 RW 0x1000
DYNAMIC 0xb32270 0x0000000000b34270 0x0000000000b34270 0x000410 0x000410 RW 0x8
GNU_RELRO 0xb06c10 0x0000000000b08c10 0x0000000000b08c10 0x031628 0x0323f0 R 0x1
GNU_EH_FRAME 0x4e8360 0x00000000004e8360 0x00000000004e8360 0x029cf4 0x029cf4 R 0x4
GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0
NOTE 0x000270 0x0000000000000270 0x0000000000000270 0x000024 0x000024 R 0x4
2026-06-26 10:41:29 +03:00
Bartosz Taudul
415197bd5d
Remove semicolon from TracySetProgramName macro.
2026-06-22 14:57:25 +02:00
Bartosz Taudul
5177e587e9
Do not include semicolons in TracySectionEnter / TracySectionLeave macros.
2026-06-22 14:56:32 +02:00
Bartosz Taudul
3a6a23ca98
Save and load sections data.
2026-06-21 00:56:32 +02:00
Ryan Jensen
978b720759
Fix warning [-Wsign-compare]
2026-06-20 17:09:26 -05:00
Marcos Slomp
d1373d3f4c
code hardening for GLES 2.0
2026-06-19 11:03:30 -07:00
Bartosz Taudul
801a34ea66
Add trigger parameter.
2026-06-17 22:37:31 +02:00
Bartosz Taudul
0cdb6d365e
Initial section enter / leave instrumentation.
2026-06-17 22:37:31 +02:00
Bartosz Taudul
e3f4c72c85
Move TRACY_ATTRIBUTE_FORMAT_PRINTF to its own header.
2026-06-17 22:37:31 +02:00
Marcos Slomp
22abcd272f
cosmetic: making things a bit more idiomatic
2026-06-16 11:30:21 -07:00
Marcos Slomp
32b712c120
force inline helper method
2026-06-16 11:24:47 -07:00
Marcos Slomp
704b5c4030
refactor sentinel value
2026-06-16 11:24:27 -07:00
Marcos Slomp
dd6962b42c
use queryId arg, not m_tail member
2026-06-16 11:24:12 -07:00
Marcos Slomp
16cfd25320
potentially faster timestamp query result check
...
Co-authored-by: Sergio Acereda <sergio.acereda@gmail.com >
2026-06-16 08:36:55 -07:00
Marcos Slomp
1de94aa856
add routine to check for GL features/extensions at run-time
2026-06-15 21:19:12 -07:00
Marcos Slomp
69af195c98
edge-case bug-fix (could cause wgpu-native to panic)
2026-06-15 13:14:28 -07:00
Bartosz Taudul
62560a6429
Add 8-bit length string transfers to the protocol.
2026-06-15 20:43:55 +02:00
Bartosz Taudul
f7b4e177ff
Change misleading etc1buf variable to texbuf.
2026-06-15 19:31:06 +02:00
Bartosz Taudul
084daf0516
Force inline send string strlen helpers.
2026-06-15 19:19:13 +02:00
Bartosz Taudul
33fccb3530
Typos.
2026-06-15 17:08:39 +02:00
Bartosz Taudul
45576f6972
Merge pull request #1400 from wolfpld/slomp/gl-example
...
adding OpenGL example (spinning triangle)
2026-06-14 21:39:54 +02:00
Bartosz Taudul
d3047f8069
Fix memory discard + callstack.
...
Bug (High Severity): Wrong queue type in MemDiscardCallstack
In the callstack path of MemDiscardCallstack, the wrong queue type is
sent:
SendMemDiscard( QueueType::MemDiscard, thread, name );
Every other callstack variant correctly uses its callstack queue type
(MemAllocCallstack, MemFreeCallstack, etc.), but this one uses the
non-callstack type. The SendMemDiscard assertion at line 1026 confirms
MemDiscardCallstack is a valid value.
Impact: The callstack captured by SendCallstackSerial() will be orphaned.
The server processes the event via the non-callstack handler, leaving the
callstack serial data unconsumed, which desynchronizes the serial queue
and corrupts all subsequent events.
2026-06-12 20:30:59 +02:00
Bartosz Taudul
a091bb4ad2
Remove "secure" variant of alloc/free.
...
Random crashes are not fun. Always use the "secure" code path.
2026-06-12 19:41:17 +02:00
Marcos Slomp
daba5acfbc
more explicit compiler warning message
2026-06-12 07:31:03 -07:00
Bartosz Taudul
07bfe3465e
Merge pull request #1356 from wolfpld/slomp/tracy-webgpu
...
GPU: WebGPU back-end
2026-06-12 12:11:32 +02:00
Bartosz Taudul
0544440a34
Remove unused, extremely broken code.
2026-06-11 22:35:25 +02:00
Marcos Slomp
f287508772
addressing type conversion warning
2026-06-11 13:28:32 -07:00
Bartosz Taudul
f622b97436
Backdate init time when a producer token predates it.
...
A zone emitted from a shared object initializer runs before the
executable's constructors, so its timestamp precedes s_initTime, which
the server uses as the trace epoch (baseTime). Such a zone converts to
negative trace time and its end no longer satisfies IsEndValid(), which
excludes it from statistics reconstruction and makes it render as
never-ending.
Record the current time when a producer token is created before
s_initTime is constructed and use it as the init time, ensuring no event
timestamp precedes the trace epoch.
2026-06-11 20:05:59 +02:00
Bartosz Taudul
dfded9d55d
Recover main thread producer orphaned by cross-module init order.
...
ELF init_priority only orders constructors within a single module. All of
a shared object's initializers run before any of the executable's, so an
instrumented dependency .so emitting a zone from its static initializer
creates the main thread producer token against the zero-initialized
s_queue. The queue constructor then resets the producer list, orphaning
that producer: every zone emitted on the main thread from that point on
is enqueued into blocks no consumer ever iterates and silently lost,
while sampling (worker thread producer) keeps working.
Re-link such a producer right after the queue is constructed. In the
common case, where nothing was emitted during shared object init, this
merely constructs the main thread token eagerly.
2026-06-11 20:05:57 +02:00
Clément Grégoire
0c74658dd3
TRACY_WIN32_NO_DESKTOP should use GetVersionExW explicitly.
...
Since we use `RTL_OSVERSIONINFOW` we need to use W version explicitly
2026-06-11 12:06:34 +02:00
Marcos Slomp
debda1df55
scoping the GpuCtx constructor
2026-06-10 18:57:22 -07:00
Marcos Slomp
d98608b022
issue a Tracy warning message when timestamp queries are supported but not properly implemented
2026-06-10 18:52:57 -07:00
Marcos Slomp
eb88c6eba0
adding warning about TracyOpenGL usage on Apple devices
2026-06-10 18:52:09 -07:00
Marcos Slomp
cfc046abcd
refactoring requirements
2026-06-10 11:09:51 -07:00
Clément Grégoire
bfab6d03f4
WORKAROUND_malloc/free should properly route to tracy_malloc/free
2026-06-10 17:15:33 +02:00
Marcos Slomp
0d848c3042
proper device descriptor chaining
2026-06-10 08:03:18 -07:00
Marcos Slomp
6fc279eef4
more descriptive API name
2026-06-10 06:23:57 -07:00
MaximeCoutantSonos
7637971e9e
Fixed typo inconsistency in Shared lock C api
2026-06-10 14:26:36 +02:00
Marcos Slomp
28d3a91980
more changes to allow for null context
2026-06-09 16:26:51 -07:00
Marcos Slomp
0fbb2eaaa4
typo
2026-06-09 16:00:43 -07:00
Marcos Slomp
b27dab4584
remove "spontaneous" callback (better determinism)
2026-06-09 15:59:38 -07:00
Marcos Slomp
75bee5370f
cosmetics
2026-06-09 15:58:24 -07:00