Commit Graph

9708 Commits

Author SHA1 Message Date
Bartosz Taudul
53fa2ba67b Fix includes. 2026-03-02 23:58:16 +01:00
Bartosz Taudul
80c849a2aa Fix client identification in tracy-capture-daemon
Use '<pid>_<ip>_<port>' string as client ID instead of IP+port hash.
This allows:
- Same program restarting (new PID) to be recognized as new client
- Multiple instances of same program (different PIDs) to capture separately
2026-03-02 23:00:42 +01:00
Bartosz Taudul
add9a77396 Document tracy-capture-daemon and reorganize merge section
- Add subsection about tracy-capture-daemon in the capturing section
- Move merge tool documentation to follow capture daemon section
- Both tools are now documented as part of the capture workflow
2026-03-02 22:39:18 +01:00
Bartosz Taudul
e6aae0c18e Add tracy-capture-daemon for multi-client capture
A discovery-and-capture daemon that listens for UDP broadcasts from
Tracy clients, automatically connects to discovered clients, and
captures each to a separate file.

Features:
- Continuous discovery until Ctrl+C
- Per-client capture threads
- Terminal display with per-client stats
- Output files named: <program>_<ip>_<port>.tracy
- Collision handling with _1, _2 suffix
- Graceful shutdown on signal

Based on the multicapture design by Grégoire Roussel, but simplified
to output separate files instead of merging (use tracy-merge for that).

Co-authored-by: Grégoire Roussel <gregoire.roussel@wandercraft.eu>
2026-03-02 22:32:45 +01:00
Bartosz Taudul
03f01b9c49 Include fixes. 2026-03-02 21:34:35 +01:00
Bartosz Taudul
2341dee04a Refactor capture utilities into CaptureOutput
Extract common output functions from capture.cpp into a proper library:

- InitTerminalDetection()/IsTerminal() - terminal detection
- AnsiPrintf() - printf with ANSI escape codes
- WaitForConnection() - blocks until connected, returns error code
- PrintCaptureProgress() - prints throughput/memory/time stats
- PrintWorkerFailure() - prints failure details with callstack

Functions are declared in CaptureOutput.hpp and implemented in
CaptureOutput.cpp. Both tracy-capture and future tools can share
this code.

Co-authored-by: Grégoire Roussel <gregoire.roussel@wandercraft.eu>
2026-03-02 21:28:22 +01:00
Bartosz Taudul
f5545f864d Document tracy-merge utility in the manual 2026-03-02 20:36:22 +01:00
Bartosz Taudul
2e82525fb4 Fix plot handling in tracy-merge
- Always export plots (remove -p/--export-plots option)
- Add plot name disambiguation: prefix with process name
- Include PID in name when same process/plot appears in multiple traces
2026-03-02 20:35:23 +01:00
Bartosz Taudul
0dc6be27f3 Add tracy-merge tool for combining trace files
Merges multiple .tracy files into a single combined trace using the
Import API. Each trace's threads are remapped using compound TIDs
encoding (pid << 32) | tid to prevent collisions.

Thread names are prefixed with process name. If the same process/thread
name combination appears in multiple traces, PID is included to
disambiguate (e.g., myapp[12345]/MainThread).

Co-authored-by: Grégoire Roussel <gregoire.roussel@wandercraft.eu>
2026-03-02 20:35:20 +01:00
Bartosz Taudul
49590756a0 Extract broadcast message parsing into TracyBroadcast
Move broadcast message parsing logic from profiler/src/main.cpp into
server/TracyBroadcast.cpp/hpp. This reduces code duplication and enables
reuse by other tools (e.g., multi-capture).

ParseBroadcastMessage() handles all broadcast protocol versions (0-3) and
returns std::optional<BroadcastMessage>. ClientUniqueID() generates a unique
identifier from IP address and port.

Co-authored-by: Grégoire Roussel <gregoire.roussel@wandercraft.eu>
2026-03-02 19:45:48 +01:00
Bartosz Taudul
9442517f30 Remove trailing whitespace. 2026-03-02 19:40:41 +01:00
Bartosz Taudul
aa30c611a8 Merge pull request #1286 from slomp/slomp/touchpad-zoom-fix
Have Touchpad gestures either scroll or zoom the timeline, but not both together
2026-02-28 22:55:25 +01:00
Marcos Slomp
20932eae88 formatting 2026-02-27 19:30:35 -08:00
Marcos Slomp
54c63c11d4 ensure touchpad gestures either scroll or zoom the timeline, but not both simultaneously 2026-02-27 19:30:35 -08:00
Bartosz Taudul
d6620568e5 Make tool reply size limit configurable in LLM settings
Add option to configure the maximum tool reply size in the advanced
settings of the LLM assistant. The limit can be enabled/disabled via
a checkbox, with the value stored in bytes. The context-based limit
is now displayed alongside the configured limit for transparency.
2026-02-26 22:40:51 +01:00
Bartosz Taudul
ad659b8f8e Update manual. 2026-02-26 22:33:50 +01:00
Bartosz Taudul
8420a1d7d6 Let's try automatic upload of release artifacts. 2026-02-20 00:27:41 +01:00
Bartosz Taudul
730dce67e6 Split build.yml into windows.yml and macos.yml. 2026-02-20 00:10:57 +01:00
Bartosz Taudul
a9070da72e Cache CPM on CI. 2026-02-19 23:07:00 +01:00
Bartosz Taudul
0abf0083be Enable workflow dispatch for CI jobs. 2026-02-19 23:06:33 +01:00
Bartosz Taudul
2bc3b87a2d Fix TracyLlm initialization when LLM is disabled. 2026-02-19 18:33:45 +01:00
Bartosz Taudul
95661c24df Revert "Bump usearch to 2.24.0."
This reverts commit 6de054002d.
2026-02-19 18:03:51 +01:00
Bartosz Taudul
27a4091975 Merge pull request #1284 from slomp/slomp/syminit-path-win32
Ensure executable path is inspected when looking for PDB files
2026-02-19 12:27:42 +01:00
Marcos Slomp
853144214b buffer checks and typo 2026-02-18 16:13:26 -08:00
Bartosz Taudul
574e0d17ec Reorder symbol statistics checkboxes and disable kernel when external is off.
External symbols checkbox now appears before kernel symbols, and kernel
is disabled when external is not selected since kernel symbols are a
subset of external symbols.
2026-02-19 00:51:04 +01:00
Bartosz Taudul
cea95bdede Do not show external symbols, frame by default. 2026-02-19 00:45:44 +01:00
Marcos Slomp
12da626fd1 ensure executable path is inspected when looking for pdb files 2026-02-17 14:27:07 -08:00
Bartosz Taudul
6de054002d Bump usearch to 2.24.0. 2026-02-17 22:06:06 +01:00
Bartosz Taudul
9079baf0b3 Bump capstone to 6.0.0-Alpha7. 2026-02-17 22:01:39 +01:00
Bartosz Taudul
a754bbe3a4 Bump imgui to 1.92.6-docking. 2026-02-17 21:49:11 +01:00
Bartosz Taudul
2ecb45d8c0 Font data must be always available. 2026-02-17 21:48:43 +01:00
Bartosz Taudul
ebd9df6ab9 Merge pull request #1283 from navvyswethgraphics/support_windows_arm64_msvc
Add native Windows ARM64 (MSVC) support across profiler, server, and ToyPathTracer sample
2026-02-17 17:38:19 +01:00
Naveen Regulla
99b502f9a4 simplify and clarify leading zeros calculation 2026-02-17 17:13:36 +05:30
Naveen Regulla
9879a31fc5 Add Windows on ARM64 with MSVC support for Tracy Profiler
Introduce Windows ARM64(native) support across ToyPathTracer,
profiler, and server code paths when building with MSVC(_M_ARM64).

Key changes:
- MathSimd.h/Maths.h:
   - Fix NEON movemask constants for MSVC/ARM64 by loading from a uint32_t[]
    via vld1q_u32() and using vdupq_n_u32() for highbit.
- enkiTS/TaskScheduler.cpp:
   - Provide Pause() implementation on _M_ARM64 using __yield().
- profiler/winmain.cpp:
   -  AVX feature checks to x86/x64 only and skip on ARM64.
- server/TracyPopcnt.hpp:
   - Implement TracyCountBits using ARM NEON intrinsics.
   - Implement TracyLzcnt using _BitScanReverse64().
2026-02-17 16:42:50 +05:30
Bartosz Taudul
75320a3353 Fix race condition when regenerating LLM reply.
The chat regenerate/trash button handling had a monolithic lock that
blocked the worker thread during token counting. The token counting
is performed by calling TracyLlmApi::Tokenize(), which issues a
blocking HTTP POST request to the LLM API - on the UI thread.

To avoid blocking both the worker and freezing the UI during HTTP
calls, the lock was split into m_jobsLock and m_chatLock. However,
this introduced a race condition.

For the assistant role (regenerate message action), the code:
1. Stops the current job and queues a new one (under m_jobsLock)
2. Releases the lock
3. Performs token counting via HTTP calls (no lock held)
4. Re-acquires m_jobsLock and stops m_currentJob again

Between steps 2 and 4, the worker thread can complete the old job
and pick up the newly queued job. The stop at step 4 then incorrectly
stops the new regenerate job instead of the old one.

Under the original monolithic lock, the worker couldn't access
m_currentJob until after step 4, so the stop always applied to the
correct job. After the split, the second stop became harmful for
the assistant case.

The fix makes the second stop conditional on user role only (thrash
action), since that's the case where no new job is queued and we
genuinely need to stop any running generation before the user edits
their message.
2026-02-17 00:04:53 +01:00
Bartosz Taudul
c1556a0a73 Merge pull request #1281 from slomp/slomp/fix-zoom-hang
Fix UI hangs due to mouse-wheel zooming
2026-02-12 18:55:35 +01:00
Bartosz Taudul
02a229b12f Merge pull request #1282 from DaniPopes/dani/fix-wasm-paste
fix: handle paste events in wasm backend
2026-02-12 13:24:38 +01:00
DaniPopes
7d27fe6ff9 fix: handle paste events in wasm backend
Listen for browser paste events and directly inject clipboard text via
AddInputCharactersUTF8. Also suppress character input when Ctrl/Meta is
held to prevent 'v' from being typed on Cmd+V.
2026-02-11 23:42:45 -05:00
Marcos Slomp
f61fa7b0e4 ensure that t0 <= t1 to prevent time-point crossover (leading to UI hangs) 2026-02-11 14:45:38 -08:00
Bartosz Taudul
0d3b5b8a04 Merge pull request #1280 from DaniPopes/dani/apple-thread-name-no-truncate
Don't truncate thread names to 15 chars on Apple platforms
2026-02-11 22:39:06 +01:00
Bartosz Taudul
2d9bed27f2 Merge pull request #1279 from DaniPopes/dani/fix-macos-zoom-scale
fix: UI zoom scale not applying on macOS
2026-02-11 22:34:56 +01:00
DaniPopes
d47344187d fix: don't truncate thread names to 15 chars on Apple platforms 2026-02-11 16:25:42 -05:00
DaniPopes
12a964d3be fix: UI zoom scale not applying on macOS
On macOS with Retina displays, dpiScale is 2.0 but gets overridden to
userScale alone under __APPLE__. The early-return check compared
prevScale against the pre-override value (dpiScale * userScale), which
for 50% zoom evaluates to 2.0 * 0.5 = 1.0, matching the previous
prevScale of 1.0 and causing an early return before the scale change
could take effect. Moving the __APPLE__ override before the early-return
check ensures the comparison uses the actual effective scale.
2026-02-10 16:33:02 -05:00
Bartosz Taudul
ea8eca6a45 Merge pull request #1273 from siliceum/WSL-and-vm-support
Better support for WSL2/VMs
2026-02-09 11:45:55 +01:00
Clément Grégoire
b890719fdd Remove stray newline in TracySysTrace.cpp 2026-02-09 11:44:16 +01:00
Clément Grégoire
e9073800d5 Remove extraneous newline in meson.build 2026-02-09 11:41:11 +01:00
Clément Grégoire
d089c3e1b0 CMake: Enforce TRACY_TIMER_FALLBACK when TRACY_DISALLOW_HW_TIMER is set. 2026-02-09 11:40:07 +01:00
Clément Grégoire
b778b67676 Fix trailing whitespace 2026-02-09 11:37:07 +01:00
Clément Grégoire
2b2fafbcfc Start cleaning TRACY_HW_TIMER checks.
Ideally I think we might want to have TRACY_HW_TIMER mean only TSC/CNTVCT, and define TRACY_TIMER_FALLBACK for platforms that don't have them or have a special case such as iOS.
But for now, keep the same behaviour.
2026-02-09 11:30:24 +01:00
Bartosz Taudul
21086a25d6 Merge pull request #1275 from The-Briel-Deal/message_l_regress
Fix regression in TracyCMessageL*() functions
2026-02-08 23:04:54 +01:00