761 Commits

Author SHA1 Message Date
Bruno Da Silva
e2ac8f7973 fix: add opengl drift correction for gpu zones 2026-06-07 00:23:14 +00:00
Bartosz Taudul
e5aa8eba51 Merge pull request #1387 from Lectem/wip/offline-res-for-any-toolchain
Offline resolution for any toolchain
2026-06-06 14:48:54 +02:00
Bartosz Taudul
fc5318dcad Some more markdown user manual compatibility fixes. 2026-06-06 01:53:05 +02:00
Bartosz Taudul
661c664b75 Converte LaTeX math in markdown to plain text. 2026-06-06 01:44:27 +02:00
Bartosz Taudul
73d78ad517 Fix tables in markdown manual. 2026-06-06 01:25:49 +02:00
Bartosz Taudul
86fbe529ed Bump font awesome to 7.2. 2026-06-05 23:28:09 +02:00
Clément Grégoire
2b11785b05 Allow offline symbol resolution with any addr2line-compatible tool
The addr2line backend of tracy-update now builds on every platform, including Windows, and can be pointed at any addr2line-compatible executable:

- `-a`: path to a custom symbol resolution tool (e.g. `llvm-addr2line` or a cross-compilation toolchain's `addr2line`). Works on all platforms and takes precedence over the platform default (DbgHelp on Windows, the `addr2line` found in `PATH` elsewhere). Path-like values are validated up front so a wrong path fails with an actionable message instead of a cryptic, localized shell error.
- `-A`: extra arguments passed verbatim to the tool, e.g. `--relative-address` so `llvm-addr2line`/`llvm-symbolizer` accept the image-relative offsets Tracy records for images with a non-zero preferred base (PE, Mach-O).
- `-v`: verbose output while patching symbols.
2026-06-05 19:03:35 +02:00
Bartosz Taudul
715815374d Rebuild markdown manual. 2026-06-05 18:42:50 +02:00
Bartosz Taudul
4f64b974c6 Update manual. 2026-06-05 18:42:24 +02:00
Marcos Slomp
224ff6d0e8 bumping "down" CUDA version 2026-06-03 11:05:06 -07:00
Marcos Slomp
cbad012980 typo 2026-06-01 11:09:01 -07:00
Marcos Slomp
d4298f7794 document CUDA version 2026-06-01 11:06:59 -07:00
Bartosz Taudul
189e8a1a89 Regenerate markdown manual. 2026-05-30 19:00:39 +02:00
Bartosz Taudul
c3e9ff17da Update manual. 2026-05-30 18:34:42 +02:00
Bartosz Taudul
1f2bbe918f Move Tracy Assist subsection to a section in the user manual. 2026-05-30 15:24:10 +02:00
Bartosz Taudul
d06755652f Merge pull request #1374 from rmarker/flameView
Allow zooming and panning the flamegraph view.
2026-05-28 20:18:45 +02:00
Bartosz Taudul
dbdbd710d8 Add readme file for the user manual directory. 2026-05-28 18:39:00 +02:00
rmarker
cc4b7dcea9 Add a reset view button to the flame graph. 2026-05-28 21:50:19 +09:30
rmarker
4a9e3ea095 Add a horizontal position bar to flame graph.
Now that the ruler just shows the delta time across the view it doesn't
indicate where the view is currently looking.
The new position bar fills this role to allow orientating oneself.
2026-05-28 21:48:14 +09:30
Bartosz Taudul
b736e4590e Rebuild markdown manual. 2026-05-27 01:52:11 +02:00
Bartosz Taudul
6b28296ef3 Add icon explanations to aid in helping icons by what they show. 2026-05-27 01:52:11 +02:00
Bartosz Taudul
c11fd010d8 Rebuild markdown manual. 2026-05-27 00:10:33 +02:00
Bartosz Taudul
121e10c837 Convert latex font awesome markup to unicode codepoints matching the C defines. 2026-05-26 23:56:27 +02:00
Bartosz Taudul
22d1c2d3c3 Properly convert bclogo blocks into markdown. 2026-05-26 22:34:45 +02:00
rmarker
37750e27ab Allow zooming and panning the flamegraph view.
It could be challenging to examine fine details within the flamegraph.
The flamegraph has been enhanced so that it allows zooming with the
mouse wheel, and then panning around with the right mouse button.
This provides a familiar experience to the timeline view.
2026-05-26 19:30:29 +09:30
Clément Grégoire
f93d17a96f Add TRACY_PLATFORM_HEADER hook for unsupported platforms.
Extension point so private/unsupported platforms can plug in their own implementations of the kernel/libc primitives Tracy depends on, without patching the `#if`/`#elif` chains.

Projects supply a platform header via `-DTRACY_PLATFORM_HEADER="\"my_platform.h\""` at build time. Tracy includes it in any TU that needs the hooks. The header toggles per-category `TRACY_HAS_CUSTOM_*` macros and declares matching `tracy::Platform*` functions.

Available hooks:

- `TRACY_HAS_CUSTOM_THREAD_ID` → `PlatformGetThreadId`
- `TRACY_HAS_CUSTOM_USER_INFO` → `PlatformGetHostname`, `PlatformGetUserLogin`, `PlatformGetUserFullName`
- `TRACY_HAS_CUSTOM_SAFE_COPY` → `PlatformSafeMemcpy`
- `TRACY_HAS_CUSTOM_ALLOCATOR` → `PlatformMalloc`, `PlatformFree`, `PlatformRealloc`, `PlatformAllocatorInit`, `PlatformAllocatorThreadInit`, `PlatformAllocatorFinalize`, `PlatformAllocatorThreadFinalize`

Each hook is wired as the first arm of its respective `#if`/`#elif` chain, so existing supported platforms are unaffected.

Template files in `examples/CustomPlatform/` and a new subsection in `manual/tracy.tex` document the mechanism.
2026-05-24 15:42:42 +02:00
Alan Tse
33fe84532e Add save_trace MCP tool for snapshotting live or loaded captures.
- save_worker binding: wraps Worker::Write under
  Worker::ObtainLockForMainThread() so live instances yield their
  receive thread cooperatively for the save's duration — the same
  pattern View::Save uses in the GUI.
- save_trace MCP tool: defaults to async_mode=True for multi-GB
  traces; reuses the existing Task/executor machinery so callers
  poll via the task tool. Path resolution mirrors load_capture.
- manual/tracy.tex: add save_trace bullet to the MCP tool list.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 01:23:31 -07:00
Marcos Slomp
8692f2a650 updating manual 2026-05-04 16:18:00 -07:00
Bartosz Taudul
0a64f16c2d More compact time range limits window. 2026-05-02 12:41:12 +02:00
Bartosz Taudul
6276f1b12a Rebuild markdown manual. 2026-05-02 00:38:44 +02:00
Bartosz Taudul
335403d860 Always dim out external frames. 2026-05-02 00:38:34 +02:00
Alan Tse
9a7233ced5 Add MCP server for AI-assisted trace analysis (#1347)
* Add MCP server for AI-assisted trace analysis.

Introduce an optional Model Context Protocol (MCP) server that lets AI
assistants analyze Tracy captures and live sessions through Tracy's own
server engine. The server runs as a Python sidecar and talks to the
existing C++ analysis code through new pybind11 bindings.

- python/bindings/ServerModule.cpp: TracyServerBindings module exposing
  Worker, file I/O, zones, GPU zones, frame data, plots, messages, locks,
  source locations, and summary statistics (zone/GPU child stats, frame
  timing, etc.).
- python/CMakeLists.txt: builds and installs TracyServerBindings alongside
  TracyClientBindings.
- extra/mcp/tracy_mcp.py: FastMCP SSE singleton with dynamic port
  discovery, PID-file based singleton detection, session-isolated worker
  instances, synchronous and background eval, task polling, and a
  shutdown tool to release the .pyd lock during development.
- extra/mcp/start_mcp.sh, .gitignore: launcher with local override hook;
  ignores generated port/pid files.
- manual/tracy.md: documents building, running, and integrating the
  server with an AI assistant.

* Improve Tracy MCP cold-start guidance.

Cold-start usability testing showed an LLM agent burned ~7 exploratory
calls discovering the ctx object model, time-unit conventions, and join
keys before producing useful analysis. Surface that information up front
through MCP resources and entry-point tool guidance.

- extra/mcp/eval_guide.md: new bindings-layer reference covering the
  Worker object graph (zone / GPU zone / frame / thread / message /
  plot / lock / memory entry points), nanosecond time units, ZoneStats
  field semantics including self-time via get_child_zone_stats, the
  opaque 'name (addr)[arch] <srcloc_id>' key format, and worked
  examples translating common queries into ctx Python.
- extra/mcp/tracy_mcp.py: expose system.prompt.md and eval_guide.md as
  MCP resources (tracy://prompt and tracy://eval-guide) so external
  agents and Tracy Assist share the same guidance source. Resource
  content is re-read per request — edits propagate without a server
  restart.
- Point load_capture and live_connect return values plus the eval tool
  description at the resources, so the agent reads them before its
  first eval rather than introspecting blind.
- Expand load_capture docstring: name the path parameter explicitly,
  show Windows path syntax, and direct agents to list_captures plus
  TRACY_CAPTURES_DIR for capture discovery.
- Probe is_connected() briefly after Worker construction in
  live_connect and surface an actionable error on silent handshake
  failures (typically a Tracy client/server version mismatch or
  TRACY_ON_DEMAND) instead of returning misleading success.

Reduces a fresh agent's cold-start overhead from 7 exploratory calls
to 4, where the remaining 4 are unavoidable harness/schema-fetch
overhead, not API-design friction.

* Detect Tracy protocol mismatches via UDP broadcast pre-flight.

Tracy clients announce themselves on UDP port 8086 every ~3 seconds with
a BroadcastMessage carrying the protocol version, listen port, and
program name (public/common/TracyProtocol.hpp). The Tracy GUI reads this
and refuses to attempt a TCP connection on protocol mismatch, surfacing
a precise error. live_connect previously had no equivalent check, so a
mismatch produced an opaque 2-second handshake timeout with no
diagnostic about what was wrong.

- Add a broadcast parser handling versions 0-3, with variable-length
  programName (Tracy sends only the actual name + null terminator on
  the wire, not the full 64-byte buffer).
- Add a non-blocking UDP listener that binds 8086 with SO_REUSEADDR
  and waits up to 3.5s — enough to guarantee catching at least one
  beat at the 3s broadcast cadence.
- Read our bindings' ProtocolVersion at startup by parsing
  TracyProtocol.hpp, so the comparison stays in sync with the build
  without new C++ wiring.
- live_connect runs the broadcast pre-flight before constructing
  Worker. On a matched listen_port with a differing protocol_version,
  it returns a single-line error naming the program, both versions,
  and the remediation, without ever opening a TCP connection. If no
  matching broadcast arrives, it falls through to the existing
  handshake probe, which now reports any other broadcasts seen as a
  hint (helpful when the target uses a non-default port).

* Add MCP Server section to LaTeX manual.

The markdown manual is auto-generated from the LaTeX source; add the
corresponding \subsection{MCP Server} so the two stay in sync.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Remove hand-written MCP section from tracy.md.

tracy.md is generated from tracy.tex via latex2md.sh. The MCP section
was previously written by hand directly in the markdown; now that the
LaTeX source has been updated, the markdown section should be
regenerated by running latex2md.sh rather than maintained manually.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 16:17:55 +02:00
Bartosz Taudul
2c6adfb416 Regenerate markdown manual. 2026-04-23 00:28:59 +02:00
Bartosz Taudul
bde6e06cd7 Update manual. 2026-04-23 00:24:09 +02:00
Clément Grégoire
c1ab158f6c Update manual with mismatch detection info 2026-04-21 13:51:24 +02:00
Bartosz Taudul
feb07e476a Merge pull request #1289 from slomp/slomp/windows-on-arm
Support for Windows on ARM
2026-03-06 23:55:02 +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
f5545f864d Document tracy-merge utility in the manual 2026-03-02 20:36:22 +01:00
Marcos Slomp
42b0512517 fix copy-pasta... 2026-02-28 20:02:21 -08:00
Marcos Slomp
83707a9c2f updated support list 2026-02-28 20:02:17 -08:00
Marcos Slomp
960911f263 update manual with remarks about Windows on ARM 2026-02-28 20:00:11 -08:00
Bartosz Taudul
ad659b8f8e Update manual. 2026-02-26 22:33:50 +01:00
Bartosz Taudul
38b73254e9 Add emoji font. 2026-01-14 01:51:32 +01:00
Bartosz Taudul
ce74512b92 Update manual. 2026-01-14 00:58:07 +01:00
Bartosz Taudul
b17002a9c0 Update markdown manual. 2025-12-31 15:28:05 +01:00
Bartosz Taudul
217906b63b Drop Ollama. 2025-12-31 15:20:28 +01:00
Clément Grégoire
f17bd3f444 TracyDebug now uses TracyInternalMessage by default unless TRACY_VERBOSE or TRACY_NO_INTERNAL_MESSAGE is defined 2025-12-28 15:00:59 +01:00
Clément Grégoire
f981330f66 Replace all messages text addr by TaggedUserlandAddress and send metadata over the network
There are two changes to the protocol:

- `QueueMessageLiteral*` were changed and what used to be addresses are now addresses+metadata
- Other messages now send `QueueMessage*Metadata` with added metadata.

This will later be used to store and transmit message sources, level, etc.
2025-12-28 14:44:40 +01:00
Bartosz Taudul
154712bc81 Keep user manual chunks in a separate object.
This makes the user manual available outside of the LLM context.

The code is also more readable, as splitting the manual into sections and
splitting section content into chunks fit for embeddings is now separated.
A bug has been fixed, where the above splits were mixed up for the last
manual section, producing invalid data.

The unembedded manual contents are no longer held in the memory. The only
use case for this was to calculate the manual contents hash. The hash is
now precalculated and cached.
2025-11-29 20:16:00 +01:00
Bartosz Taudul
e6b9ea4609 Release 0.13.0. 2025-11-11 16:31:54 +01:00