Commit Graph
11211 Commits
Author SHA1 Message Date
Bartosz Taudul f86bdf7bb1 Add a wait stacks achievement. 2026-11-04 01:29:15 +01:00
Bartosz Taudul 458faecb34 Add a timeline navigation achievement. 2026-11-04 01:29:13 +01:00
Bartosz Taudul 0766a5ce7e Fix the sanitizer detection on older preprocessors. 2026-11-02 20:40:03 +01:00
Bartosz Taudul e2600f0314 Use raw write syscall for safe copy under AddressSanitizer.
The sanitizer's write() interceptor aborts the process when the buffer
touches poisoned bytes, even if the pages are mapped. Global redzones
are such bytes, and clang counts them in the global's symbol size, so
a symbol code query can request a range spanning the redzone and kill
the profiled app. syscall() is not intercepted; the kernel does the
copy and fails unmapped pages with EFAULT, like without the sanitizer.
2026-11-02 20:09:51 +01:00
Bartosz Taudul 3430cd8db8 Add a Tracy Assist achievement. 2026-11-02 01:05:43 +01:00
Bartosz Taudul 2e9dfb8fdf Add visibility predicates to achievements. 2026-11-02 00:59:04 +01:00
Bartosz Taudul 41ea9b8b31 Add a hardware counters achievement. 2026-11-02 00:59:04 +01:00
Bartosz Taudul 0342049936 Add a crash survival achievement. 2026-11-02 00:59:04 +01:00
Bartosz Taudul a6cb6ec3c2 Add an annotations achievement. 2026-11-02 00:59:04 +01:00
Bartosz Taudul d3fcf981c9 Add a frame statistics achievement. 2026-11-02 00:59:04 +01:00
Bartosz Taudul 000ae58203 Add a CPU data achievement. 2026-11-02 00:59:03 +01:00
Bartosz Taudul ecf9d08643 Add a context switches achievement. 2026-11-02 00:59:01 +01:00
Bartosz Taudul 18240d9212 Use a PNG image for the AppImage .DirIcon.
appimagetool now treats an SVG .DirIcon as a fatal packaging error.
2026-10-31 18:34:39 +01:00
Bartosz Taudul b131e114ac Add a zone call stacks achievement. 2026-10-31 18:13:33 +01:00
Bartosz Taudul 40032ed09a Add a frame sets achievement. 2026-10-31 18:13:32 +01:00
Bartosz Taudul 4fbd6010b3 Add a log messages achievement. 2026-10-31 18:13:32 +01:00
Bartosz Taudul de8962d117 Add an entry stacks achievement. 2026-10-31 18:13:32 +01:00
Bartosz Taudul d915345d91 Add a sampling statistics achievement. 2026-10-31 18:13:32 +01:00
Bartosz Taudul a51bb8c738 Add a memory pools achievement. 2026-10-31 18:13:32 +01:00
Bartosz Taudul a4595ee85d Add an allocation call stacks achievement. 2026-10-31 18:13:32 +01:00
Bartosz Taudul 97d9368741 Add a GPU statistics achievement. 2026-10-31 18:13:32 +01:00
Bartosz Taudul c6e8813c3a Add a thread naming achievement. 2026-10-31 18:13:31 +01:00
Bartosz Taudul 50f5bb674a Add a HeaderClicked hook to timeline item headers. 2026-10-31 18:13:31 +01:00
Bartosz Taudul 76bdf0cdb7 Achievements text tweaks. 2026-10-31 18:13:29 +01:00
Bartosz Taudul 16ca4f5913 Merge pull request #1475 from xdBronch/fuchsia
import/fuchsia: stop manually null terminating names
2026-10-30 20:33:01 +01:00
Bartosz Taudul 20a293b357 Merge pull request #1505 from Lectem/history-json
Store profiler history in a single history.json
2026-10-29 21:10:11 +01:00
Lectem 056faddb24 Store profiler history in a single history.json
Replace the binary connection.history file and the ConnectionHistory class
with History, which keeps the history in a JSON file and writes it back when
the profiler exits. Existing history is not migrated.
2026-10-29 20:36:22 +01:00
Bartosz Taudul af6b4fa729 Merge pull request #1504 from Lectem/windows-dll-unload-hang
Don't deadlock when joining threads from a DLL being unloaded.
2026-10-29 19:20:29 +01:00
Bartosz TaudulandTim Jammer 63c0a2f723 Leak statics that profiler threads use during exit.
Function-local statics are destroyed in reverse order of initialization,
on the same atexit stack that carries the shutdown handler installed at
profiler startup. Statics initialized lazily while profiling are
therefore destroyed before that handler runs, while worker and network
threads may still be using them; with TRACY_NO_EXIT the handler blocks
in the exit sequence until the server disconnects, keeping the threads
live across the entire destruction. On Android this let a symbol query
execute `s_mappings = ParseMappings()` on a destroyed vector, causing a
use-after-free and a double free. The legacy-GCC thread data key carried
the same hazard: pthread_key_delete at static destruction while threads
could still call pthread_getspecific on the key.

Construct the objects on the heap and never free them. The allocations
are one-time and stay referenced, so leak sanitizers classify them as
still reachable.

Co-authored-by: Tim Jammer <tim.jammer@web.de>
2026-10-29 18:17:07 +01:00
Bartosz Taudul aaccc47036 Merge pull request #1490 from Lectem/shared-sampling-rings
Shared sampling rings for monitor
2026-10-29 17:51:31 +01:00
Clément Grégoire a181b62a6a Don't deadlock when joining threads from a DLL being unloaded.
When Tracy is built into a DLL, the static `Profiler` is destroyed inside `DllMain(DLL_PROCESS_DETACH)` while the loader lock is held. `Thread::~Thread()` waited for the thread to exit, but a thread can only exit by taking the loader lock for `DLL_THREAD_DETACH`, so `FreeLibrary` hung forever (typically in `s_symbolThread->~Thread()`).

The thread function now signals an event when it is done and parks in an alertable sleep instead of returning. The destructor waits for that event rather than for the thread itself. Inside a loader callout (detected with `RtlIsThreadWithinLoaderCallout`) the parked thread is terminated, which is safe as it holds no locks at that point. Everywhere else it is woken with an APC and exits normally, so `thread_local` destructors still run. If the ntdll export is unavailable, the previous behaviour is kept.

Same approach as `asio::detail::win_thread`.

Reproduced with a test DLL embedding Tracy (`TRACY_ON_DEMAND`) loaded and freed in a loop: `FreeLibrary` hung on the first unload before the change, and 100 cycles pass after it when the DLL stays loaded for at least a few ms. Unloading immediately after loading still hangs if the Tracy threads are blocked on the loader lock during their startup (e.g. in `gethostname` or `SymInitialize`), as they never reach the parking point. Startup and shutdown timings are unchanged.
2026-10-29 14:14:20 +01:00
Clément Grégoire 4ff170540e Address review comments on the shared sampling rings
Move the shared ring comment onto `OpenSampleEvent`, where the sharing happens. Name the number of sampling event kinds with `NumSampleEventKinds` instead of using `EventVsync` directly, and assert in `OpenSampleEvent` that the event id is below it.
2026-10-29 13:15:46 +01:00
Bartosz Taudul 9f1c8e652c Merge pull request #1502 from alandtse/pr/mcp-plot-thread-stats
feat(mcp): add plot window and thread zone stats
2026-10-27 20:53:12 +01:00
Bartosz Taudul b5acd07901 Merge pull request #1500 from alandtse/fix/d3d11-reconnect-disjoint
fix(d3d11): resume GPU timing after reconnect
2026-10-27 20:51:52 +01:00
Alan TseandClaude Sonnet 5.5 bbb4eebc61 feat(mcp): get zone stats for a single thread
get_all_zone_stats mixes every thread, so the main-thread cost of a
zone could not be separated from worker threads. get_thread_zone_stats
returns the same per-name stats for the zones recorded on one thread,
and its per-thread sums match get_all_zone_stats exactly.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L3DnWkXakGRgz9C8BaLM47
2026-10-27 10:04:47 -07:00
Alan TseandClaude Sonnet 5.5 0ea62d9551 feat(mcp): read plot samples by time window
get_plots only summarises a whole trace, so a plot could not be
compared across windows. get_plot_samples returns the (time, value)
pairs in a range, thinned to a maximum count, and
get_plot_window_stats returns count, min, max and average over just
that range.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L3DnWkXakGRgz9C8BaLM47
2026-10-27 10:04:47 -07:00
Alan TseandClaude Sonnet 5.5 a03c657cb5 fix(d3d11): resume GPU timing after reconnect
When the client disconnects while a disjoint query result is pending,
the not-connected branch of Collect resets the checkpoints without
re-issuing Begin. The next connected Collect then calls End twice, so
no GpuTime items are produced and every later connection shows GPU
zones with no timings.

Drain the pending result and Begin the query before resetting.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L3DnWkXakGRgz9C8BaLM47
2026-10-27 02:32:29 -07:00
Bartosz Taudul 1f4c53574b Merge pull request #1498 from tuket/master
Remove assert that was failing in Android 9
2026-10-26 12:29:51 +01:00
tuket 270691f485 remove assert that was failing in Android 9 2026-10-26 09:02:42 +01:00
Bartosz Taudul 78f0da621e Merge pull request #1494 from jjcasmar/cuda-serialized-kernel-activity
Add an option to force serial CUDA kernel execution in CUPTI activity tracing
2026-10-23 12:04:11 +02:00
Juan Jose Casafranca d0ddff87da Rename TRACY_CUDA_SERIALIZED_KERNEL_ACTIVITY to TRACY_CUDA_FORCE_KERNEL_SERIAL_EXECUTION. 2026-10-22 21:30:24 +00:00
Juan Jose Casafranca 52ebe6c258 Add an option to collect CUDA kernel activity as CUPTI_ACTIVITY_KIND_KERNEL.
With CONCURRENT_KERNEL, MEMCPY or MEMSET activity enabled, CUPTI 13.0
faults the device with an illegal memory access once the nodes inside CUDA
graph conditional (IF/WHILE) bodies have executed about 699,050 times in a
context. TRACY_CUDA_SERIALIZED_KERNEL_ACTIVITY enables KERNEL activity
instead, which avoids the fault at the cost of serializing kernels. In that
mode CUPTI reports conditional-body kernels once per graph launch without
timestamps, so those records are skipped.
2026-10-22 19:45:43 +00:00
Bartosz Taudul e15c78fdac Wait for background reconstruction before exporting plots. 2026-10-22 17:44:47 +02:00
Lectem 71d2513d0e Share one ring per event kind and CPU in the sampling client
Sampling events of one kind on one CPU now share a ring: the first
thread's event owns it, and the others are redirected into it with
PERF_EVENT_IOC_SET_OUTPUT. Redirected fds are kept open and enabled by
the worker.
2026-10-20 19:54:22 +02:00
Lectem b8935a8a56 Group sampling globals into SysTraceState
Move the sampling client's file-level globals into a single SysTraceState
struct, so that the state of a trace session is in one place.
2026-10-20 19:54:22 +02:00
Bartosz Taudul 29aa268641 Add an assembly reading achievement. 2026-10-18 22:04:20 +02:00
Bartosz Taudul b8c32a326a Add a trace comparison achievement. 2026-10-18 21:57:52 +02:00
Bartosz Taudul 5c0dc013d1 Add a flame graph achievement. 2026-10-18 21:57:52 +02:00
Bartosz Taudul 7b3ace0d2b Add a source view achievement. 2026-10-18 21:57:51 +02:00
Bartosz Taudul 7cb1921808 Report file selector failure instead of crashing when NFD_Init failed. 2026-10-17 20:21:06 +02:00