Commit Graph
10998 Commits
Author SHA1 Message Date
Bartosz Taudul f032eba389 Bump glfw to 3.5.1. 2026-09-10 00:51:11 +02:00
Bartosz Taudul 656980d757 Bump curl to 8.22.0. 2026-09-10 00:51:06 +02:00
Bartosz Taudul f60889e1a7 Compute Find zone std dev from the displayed distribution.
The raw sumSq paired with a self/running mean yielded the raw variance
inflated by the squared mean gap. Accumulate the vector's own sum of
squares alongside its sum, like compare and frame statistics do.
2026-09-09 21:13:14 +02:00
Bartosz Taudul 82790f904f Save context switches of all threads.
Per-thread lists were dropped for threads without zones or samples, a rule
from when only profiled threads consumed them; the CPU data graph uses them
for any visible thread, so saved traces silently lost wake and wait data.
2026-09-09 01:53:09 +02:00
Bartosz Taudul ed468d8625 Reject truncated trace files.
Block sizes weren't checked against the file length, so truncated files
made the decompression threads read off the mapping. Validate framing
(u32 size + payload) before the mapping and threads exist; also reject
zero-stream or empty files.
2026-09-09 01:04:55 +02:00
Bartosz Taudul 25ba41c44e Read tracepoint field offsets from tracefs format files.
The client decoded sched_switch, sched_waking and drm_vblank_event at
fixed positions behind an 8-byte common header. The kernel can extend the
header, which shifts the field positions.

The format files are generated from the live trace_entry (offsetof/ALIGN),
making them the authoritative layout.
2026-09-08 22:08:16 +02:00
Bartosz Taudul 2ba979056c Merge pull request #1467 from psmyles/sections-group-by-category
Add option to group section rows by category
2026-09-08 18:15:36 +02:00
Chandan Singh ecf722b64f Remove stray carriage return in the manual 2026-09-08 21:44:34 +05:30
Chandan Singh 66434446b1 Add option to group section rows by category.
Sections are packed into timeline rows purely by length, so sections
from different categories share rows and the same category can move
between rows along the timeline. When categories mark different kinds of
activity (game levels, loading screens, cutscenes) this makes the row
layout hard to read.

The new "Group by category" option in the section options lays out each
category in its own set of rows, in category identifier order, with the
existing length-first packing applied within a category. Off by default,
so the current layout is unchanged unless the option is enabled. Only
shown when the trace has more than one section category.
2026-09-08 15:03:02 +05:30
Bartosz Taudul da5c8153bc Disable capture-daemon directory lock on windows. 2026-09-06 01:48:06 +02:00
Bartosz Taudul ad0785f6c2 Update pandoc to 3.11.
Pandoc 3.11 appends the LaTeX caption label to Markdown table
captions as a {#id} identifier; strip it in tablecaption() since the
manual renderer has no identifiers.
2026-09-06 01:25:08 +02:00
Bartosz Taudul 82a4eea9d5 Update manual. 2026-09-06 01:07:47 +02:00
Bartosz Taudul 6992454dfd Save the tracy-monitor trace to a file. 2026-09-06 01:07:47 +02:00
Bartosz Taudul 3909a7407a Capture the trace in-process in tracy-monitor. 2026-09-06 01:07:47 +02:00
Bartosz Taudul 89c2b9e5f8 Add the capture-side server to the monitor build.
The monitor embeds the capture side of the protocol (TracyWorker) to
save traces to disk; like tracy-capture, build it without statistics
and at C++20.
2026-09-06 01:07:47 +02:00
Bartosz Taudul d288c38c98 Add a per-directory lock file to the capture daemon.
Only one daemon can write to a given output directory at a time. The
lock holds the daemon PID and is removed on a clean exit; a lock whose
owner is verifiably gone is taken over on the next start, and a lock
whose owner cannot be read or that reads as alive must be removed by
hand.
2026-09-06 01:07:47 +02:00
Bartosz Taudul 6735c64306 Extend GUI skill to support headless X11. 2026-09-06 01:07:47 +02:00
Bartosz Taudul fab65fae88 Agent guidance. 2026-09-06 01:07:47 +02:00
Bartosz Taudul 2dfe5c5c75 Save tracy-update output through a temporary file. 2026-09-06 01:07:46 +02:00
Bartosz Taudul 927ca83894 Save tracy-merge output through a temporary file. 2026-09-06 01:07:46 +02:00
Bartosz Taudul 51160bcc28 Save GUI traces through a temporary file. 2026-09-06 01:07:46 +02:00
Bartosz Taudul e848076dfa Add a file writer that replaces its target only on completion.
The data is written to <fn>.tmp in the same directory as the target
and moved to <fn> on Commit(); a failed or interrupted write leaves
the previous file untouched, with an orphaned .tmp.
2026-09-06 01:07:46 +02:00
Bartosz Taudul 6aa41759d0 Flush the output file in FileWrite::Finish.
The final compressed block was left in the stdio buffer until the
destructor closed the file, so a caller that inspected the file after
Finish() saw a truncated trace.
2026-09-06 01:07:46 +02:00
Bartosz Taudul 4cbec36af6 Remove undefined source list variables from the capture build. 2026-09-06 01:07:46 +02:00
Bartosz Taudul db6a46cf3e Extract shared capture-side tool code into TracyUtil. 2026-09-06 01:07:46 +02:00
Bartosz Taudul ebf5ebd9bd Replace the output file safely in tracy-capture.
The old pre-flight truncated the output at startup with -f, so an
interrupted capture lost the trace, and the probe fopen followed a
symlink. The existing file is now moved to FILE~ for the duration of
the capture and restored if the trace cannot be written.
2026-09-06 01:07:45 +02:00
Bartosz Taudul cf3407bbe3 Fix empty rate sample list read in the connection popup. 2026-09-06 01:07:45 +02:00
Bartosz Taudul 89f12318a1 Fix empty rate sample list read in the daemon stats. 2026-09-06 01:07:45 +02:00
Bartosz Taudul fa4336dd26 Fix empty rate sample list read in the progress line.
HasData() flips when the connection is established, but the rate
list is only filled by the worker periodic stats update, whose first
entry arrives ~200ms later, so the first render could read an empty
list.
2026-09-06 01:07:45 +02:00
Bartosz Taudul 89132aed2a Merge pull request #1466 from akx/macos-level
Use CMAKE_OSX_DEPLOYMENT_TARGET 15.0 by default
2026-09-02 14:23:33 +02:00
Aarni Koskela 76c310eade Use CMAKE_OSX_DEPLOYMENT_TARGET 15.0 by default
As it is, the CI-built macOS binaries refuse to work on
macOS Sequoia because it defaults to the runner machine's level.

This sets a lower-than-default default for the target.
2026-09-02 10:39:36 +03:00
Bartosz Taudul 538af5c89c Learn the actual port of an adopted listen socket.
Adopting a pre-bound socket via SetReservedListenSocket left Worker()'s
port bookkeeping untouched, so GetPort() and the broadcast announcement
reported the computed default instead of the port the socket listens on.
The monitor kept this correct by mirroring the reserved port into
TRACY_PORT; direct users of the public API had no such coupling.

The bound socket is now authoritative: Worker() reads the local port
back via getsockname after binding. The search-loop bookkeeping stays
only as a fallback for a getsockname failure.
2026-08-31 19:30:23 +02:00
Bartosz Taudul f52bf6a718 Merge pull request #1461 from ofoure/master
Added Profiler::GetPort() and TracyPort macro
2026-08-31 19:07:37 +02:00
Bartosz Taudul 70e4170e26 Cache the downloaded pandoc binary. 2026-08-31 18:54:55 +02:00
Bartosz Taudul c6f1cb7585 Generate markdown manual at build time. 2026-08-31 18:54:55 +02:00
Bartosz Taudul 00e152b97a Allow embedding files from the build directory. 2026-08-31 18:54:53 +02:00
Olivier Fouré 17a4080713 Documented the TracyPort macro in the manual. 2026-08-31 09:58:26 +02:00
Bartosz Taudul c756e7418e Fix android build. 2026-08-31 02:48:20 +02:00
Bartosz Taudul 71f0c992f7 Build monitor on CI. 2026-08-31 02:48:16 +02:00
Bartosz Taudul 06f4e13012 Document tracy-monitor in the user manual. 2026-08-31 01:58:38 +02:00
Bartosz Taudul a66cc184e8 Annotate the file sections. 2026-08-31 01:58:37 +02:00
Bartosz Taudul c9abfce098 Add a TRACY_ON_DEMAND build option. 2026-08-31 01:58:37 +02:00
Bartosz Taudul a15e08f135 Rewrite the usage text. 2026-08-31 01:58:37 +02:00
Bartosz Taudul fdff78584a Raise the fd limit for the sample events.
External sampling opens one event per CPU for each existing thread
(attach) or per CPU (launch) per event type, so a multithreaded target
needs many fds.
2026-08-31 01:12:41 +02:00
Bartosz Taudul 893439772f Reject client configurations that cannot work.
TRACY_NO_CALLSTACK, TRACY_NO_SYSTEM_TRACING, TRACY_NO_SAMPLING and
TRACY_SAMPLING_PROFILER_MANUAL_START either fail to build (the external
target API lives in the callstack code) or silently produce an empty
capture (no sampling event fails, so IsSystemTracingFailed stays false).
The first three are #error'd at compile time; the TRACY_NO_SYS_TRACE /
TRACY_NO_SAMPLING environment variables are refused at startup.
2026-08-31 01:12:41 +02:00
Bartosz Taudul 6d794801c6 Verify the exec stop in launch mode.
A caught signal (the handlers are inherited by the child) delivered
between PTRACE_TRACEME and exec first produces a signal-delivery stop;
without handling it, the setup would run on the still pre-exec child and
capture the monitor's own image as the target's. Re-inject the caught
signal and wait again until the exec stop is reached. Job-control stops
are the exception - re-injecting SIGSTOP/SIGTSTP re-stops the child, and
PTRACE_CONT rejects a stop carrying the 0x80 job-control bit - so resume
those without a signal instead.
2026-08-31 01:12:41 +02:00
Bartosz Taudul b36c8f2fc5 Refuse to start without tracefs.
The client's system tracing cannot start without a tracefs (or debugfs)
mount - the tracepoint ids live under it - so starting anyway would
capture no samples.
2026-08-31 01:12:41 +02:00
Bartosz Taudul 2f2d8a7ba9 Fail when system tracing fails to start.
IsSystemTracingFailed reports a SysTraceStart that the preflight could
not predict (the target exiting between the checks, the kernel rejecting
the event setup); starting anyway would capture no samples.
2026-08-31 01:12:41 +02:00
Bartosz Taudul d498829518 Verify the client is listening after startup.
Polling IsDataPortListening is the only reliable check: probing the port
itself cannot distinguish the client's listener from another process
holding it.
2026-08-31 01:12:40 +02:00
Bartosz Taudul e87b7c873e Reserve the client listen port.
When TRACY_PORT is not pinned the client probes 8086..8105 at startup.
Reserve the first free port up front and hand the already-bound socket
to the client via SetReservedListenSocket, so the reservation is atomic
and the reported port matches what the client listens on. A pinned
TRACY_PORT is validated like --port, since the client pins to any
nonzero value with no fallback.
2026-08-31 01:12:40 +02:00