Commit Graph
10815 Commits
Author SHA1 Message Date
Bartosz Taudul 9209bcdafd Add connectionId protection to C API zone functions. 2026-08-02 19:57:13 +02:00
Bartosz Taudul 8c8d451a2d Merge pull request #1446 from nyanpasu64/fork
Add formatted zone text/name macros to C API
2026-08-02 11:51:53 +02:00
nyanpasu64 bfdf647114 Rename TracyFormat.hpp to .h since it's used in the C API 2026-08-01 18:19:01 -07:00
nyanpasu64 0558301e49 Address LLM review comments 2026-08-01 18:15:27 -07:00
nyanpasu64 71098f707c TracyCZoneTextF/TracyCZoneNameF 2026-08-01 16:27:55 -07:00
Bartosz Taudul a1fb20e620 Initialize uninitialized View members 2026-08-01 13:51:47 +02:00
Bartosz Taudul 9e163ad6b9 Remove dead vertical timeline centering toggle 2026-08-01 13:42:51 +02:00
Bartosz Taudul 93a8f86850 Use the mouse event abstraction in timeline click handlers 2026-08-01 13:27:43 +02:00
Bartosz Taudul 5698b45820 Hold worker data lock for the whole draw frame 2026-08-01 12:24:17 +02:00
Bartosz Taudul 95811a658a Save drawFrameTargets and plotHeight as configurable defaults 2026-08-01 11:52:00 +02:00
Bartosz Taudul 37468811c7 Declare ___tracy_get_time with explicit void parameter list. 2026-08-01 11:37:36 +02:00
Bartosz Taudul a6352890f4 Check buffer bounds before accessing the buffer. 2026-08-01 02:17:59 +02:00
Bartosz Taudul 07b7219498 Use proper buffer size for program name normalization. 2026-08-01 02:15:29 +02:00
Bartosz Taudul 370a41225e The suggested llm query should be from the user's perspective. 2026-08-01 01:42:59 +02:00
Bartosz Taudul 1ad64f19a7 Use ctx.scale in timeline items instead of GetScale(). 2026-08-01 01:38:18 +02:00
Bartosz Taudul 93af7f987a Fix data race on pending thread hints. 2026-08-01 01:38:16 +02:00
Bartosz Taudul 144fec96d3 Do not scan source length over the destination size. 2026-08-01 00:59:29 +02:00
Bartosz Taudul 3448832b72 Replace impactful cases of strcpy with strzcpy. 2026-08-01 00:37:35 +02:00
Bartosz Taudul c136232c97 Use strzcpy in client library. 2026-08-01 00:06:39 +02:00
Bartosz Taudul 7ee384630b Do not use strncpy in trace info window. 2026-08-01 00:06:39 +02:00
Bartosz Taudul 5ef415619d Add safe string copy. 2026-08-01 00:04:02 +02:00
Bartosz Taudul 8985887128 Don't include GUI profiler deps for all other tools. 2026-07-31 22:01:52 +02:00
Bartosz Taudul bf21d8ea11 Bump ImGui to 1.92.9b-docking. 2026-07-31 18:12:14 +02:00
Bartosz Taudul bc85c4faa5 Fix include guard. 2026-07-31 18:12:13 +02:00
Bartosz Taudul 8fd29b1038 Merge pull request #1441 from alandtse/fix/mcp-live-memory-limit
fix(mcp): cap live sessions to avoid OOM
2026-07-31 13:03:45 +02:00
Bartosz Taudul d46fe6fd9f Merge pull request #1432 from alandtse/feat/mcp-crash-diagnostics
fix(mcp): recover from hangs and evict idle files
2026-07-31 13:03:12 +02:00
Alan Tse 613524247f docs(mcp): document file-idle eviction TTL
The guide claimed "two backstops" and only described the LRU cap
and the disconnected-live TTL, omitting the new file-idle TTL
entirely -- a cold agent reading it would have no idea idle
file-loaded captures now expire too, or what env var controls it.
2026-07-30 22:07:54 -07:00
Alan Tse a418ec6a03 fix(mcp): evict idle file-loaded captures too
Automatic eviction only ever covered disconnected live instances
(_evict_disconnected_idle explicitly skipped anything with a
path), so a file-loaded capture -- potentially many GB -- stayed
resident forever until the TRACY_MCP_MAX_INSTANCES cap forced an
LRU eviction to make room. list_instances already documented
"unload_capture instead of waiting for automatic eviction" as the
alternative, but no automatic path actually existed for this case.

Generalizes the sweep into _evict_idle: file-loaded instances now
get their own idle-since-last-use TTL (TRACY_MCP_FILE_IDLE_TTL_S,
default 1800s matching the disconnected-live TTL). Safe to evict
on a timer since they're already durably on disk -- load_capture
brings them back. Connected live instances are untouched, same as
before.
2026-07-30 22:07:33 -07:00
Alan Tse 00c2245c49 fix(mcp): recover cleanly from a hung server
Addresses the "server just vanishes" pattern from
alandtse/tracy#2, where Unable to connect gives no way to tell a
segfault apart from a hang and required manually killing an
unresponsive process before restart.

- faulthandler.enable() at startup writes a thread-state
  traceback to tracy_mcp.crash.log on a genuine fatal crash
  (works on Windows via SetUnhandledExceptionFilter).
- The periodic sweep loop now also logs a heartbeat (uptime,
  instance/task counts, evictions) so a hung event loop is
  distinguishable from a dead process by the last timestamp on
  disk.
- _is_our_server_running() now backs its os.kill(pid, 0) check
  with an HTTP self-ping. A deadlocked-but-alive process passed
  the old PID-only check, silently blocking restart; a
  non-responsive server is now reported by PID and a fresh
  instance starts on a new port instead.
2026-07-30 22:06:57 -07:00
Alan Tse e4fab6af3a fix(mcp): cap live sessions to avoid OOM
live_connect wrapped Worker(addr, port) with no memoryLimit, so
the binding default (-1, unlimited) applied. A long-lived live
session on a busy target grows unbounded -- every zone/message/
memory event stays resident until disconnect -- and can OOM-kill
the whole server process rather than just that one instance.

Worker already has a graceful cap: TracyWorker.cpp's receive loop
checks memoryLimit and calls QueryTerminate() + a clean disconnect
once exceeded, instead of continuing to grow. Just wasn't wired up
from Python.

Adds memory_limit_mb to live_connect (defaults to
TRACY_MCP_LIVE_MEMORY_LIMIT_MB, 8192 if unset; 0 disables),
converts to bytes for the Worker constructor, and reports the
active limit in the connect response.
2026-07-30 21:48:06 -07:00
Bartosz Taudul b418abd8de Merge pull request #1439 from ivanstepanovftw/fix-dwarf-npd
fix #1438 null dereference in dwarf
2026-07-30 19:25:41 +02:00
Ivan Stepanov 1673a305cf fix #1438 null dereference in dwarf 2026-07-30 14:33:49 +02:00
Bartosz Taudul 3baa2f0a09 Fix typo. 2026-07-29 18:57:03 +02:00
Bartosz Taudul 46b21c0c75 Update ARM CPU identifiers. 2026-07-29 18:54:10 +02:00
Bartosz Taudul a02513c1a2 Update Tim Apple devices list. 2026-07-29 15:18:46 +02:00
Bartosz Taudul ead931ef3c Safeguard against zero count entries in statistics list.
There is a legitimate, if rare, way to get nonReentrantCount == 0 with
total != 0 — an outer zone that never terminated before the capture ended,
whose reentrant inner zone did terminate. The outer never contributes to
slz (no end event), but it did increment the stack count, so the inner one
is correctly recorded as a reentry.
2026-07-28 23:49:01 +02:00
Bartosz Taudul 6b2abcb47a Properly set countMap to 0 when loading a trace.
The live capture code path already does the equivalent thing.
2026-07-28 23:47:49 +02:00
Bartosz Taudul e0862e8534 Disallow implicit StringIdx construction. 2026-07-28 22:33:26 +02:00
Bartosz Taudul ec0a1c0606 Update manual. 2026-07-28 20:52:41 +02:00
Bartosz Taudul 372b83d590 Update NEWS. 2026-07-28 20:48:14 +02:00
Bartosz Taudul 4779856174 Shorten image names in flame graph blocks. 2026-07-28 20:36:06 +02:00
Bartosz Taudul c4b1308c21 Use image name shorten helper. 2026-07-28 20:36:06 +02:00
Bartosz Taudul 488270c728 Add image name shortening helper. 2026-07-28 20:28:27 +02:00
Bartosz Taudul ff81feedca Add tooltip for unknown flame graph blocks. 2026-07-28 20:25:39 +02:00
Bartosz Taudul b677b352ee Show image names in flame graph unknown items. 2026-07-28 20:09:13 +02:00
Bartosz Taudul 8b836a5d56 Display unknown frames on flame graph. 2026-07-28 19:27:30 +02:00
Bartosz Taudul ee54c04d3b Don't display empty tooltip in no-symbol-data case. 2026-07-28 19:26:57 +02:00
Bartosz Taudul fa8bd1adf8 Fix grouping by name when merging flame graphs. 2026-07-28 19:25:35 +02:00
Bartosz Taudul 987d440d74 Merge pull request #1435 from damcclos/damcclos/client-ordering
Ordering the clients in the connection dialog to prevent jumping in the list. Ordering by time still caused jumps.
2026-07-28 17:46:29 +02:00
David McCloskey 064d400cf1 Ordering the clients in the connection dialog to prevent jumping in the list. Ordering by time still caused jumps. 2026-07-27 15:33:14 -05:00