10829 Commits

Author SHA1 Message Date
Bartosz Taudul
eacb64a714 Hack around lack of flag to always enable scrollbar in a table.
https://github.com/ocornut/imgui/issues/9499#issuecomment-5182563922
2026-08-04 19:43:55 +02:00
Bartosz Taudul
bdb0f3c3d7 Replace vertical / horizontal AddLine calls with AddLineV / AddLineH. 2026-08-04 19:00:59 +02:00
Bartosz Taudul
757c2fff30 Grammar. 2026-08-03 22:23:19 +02:00
Bartosz Taudul
a6d96d4201 Ignore all-newline message chunks at the beginning of LLM content.
DeepSeek 4 Flash likes to send "\n\n" as content between the reasoning
and tool call sections.
2026-08-03 22:23:03 +02:00
Bartosz Taudul
1c2a8b4c40 Filter out thinking, tool calls, attachments from the summary and suggestion. 2026-08-03 22:23:03 +02:00
Bartosz Taudul
6dd09e3ed8 Make the tool reply limit easier to understand. 2026-08-03 20:09:24 +02:00
Bartosz Taudul
96dcd7a38b Source tooltip may render more than one active line. 2026-08-03 18:26:49 +02:00
Bartosz Taudul
0290f0ba54 Give instructions for providing source file ranges. 2026-08-03 18:26:49 +02:00
Bartosz Taudul
1866cf25b9 Support extracting lines range. 2026-08-03 18:26:49 +02:00
Bartosz Taudul
d91769b72e Check if there's a parent directory to go to on .. in NormalizePath. 2026-08-03 18:26:49 +02:00
Bartosz Taudul
d0ffd8dc86 Merge pull request #1448 from 17steen/fix/cuda-defer-gpu-new-context
Defer CUDA GpuNewContext for on-demand connections
2026-08-03 12:31:21 +02:00
Robin Oger
5df9ac73c7 Defer CUDA GpuNewContext for on-demand connections.
CUDACtx's constructor writes GpuNewContext directly through
QueueSerialFinish(), unlike every other GPU backend (Vulkan, OpenGL,
D3D11/12, Metal, WebGPU, Rocprof), which all defer it via
GetProfiler().DeferItem() so it survives on-demand's per-connection
queue clear.

A profiler connecting any time after the CUDA context is created (in
practice: any time after process start) never receives GpuNewContext.
The GpuContextName message that Name() sends right after (already
correctly deferred) then crashes the server's
Worker::ProcessGpuContextName with an unregistered context id
(assert(ctx) fails; undefined behavior in release builds).

Same fix already applied to the Rocprof backend in #1336. Fixes #1171.

Includes a repro test under tests/cuda/repro/on_demand/, mirroring the
structure #1336 added for Rocprof: a minimal CUDA program that creates
an on-demand context (repro.cu/CMakeLists.txt), and a check_gpu_zones
tool that loads the resulting .tracy file and verifies the GPU context
was named and populated with zones. Verified locally: unpatched
tracy-capture crashes on the first connection attempt; patched, three
consecutive connect/disconnect cycles all succeed and check_gpu_zones
reports a named context with recorded zones.
2026-08-03 10:48:20 +02:00
Bartosz Taudul
facbd3c0a7 Add connectionId protection to GPU zone scopes. 2026-08-02 20:44:48 +02:00
Bartosz Taudul
df29943d78 Add TRACY_ON_DEMAND guards to C API GPU functions. 2026-08-02 20:44:46 +02:00
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