Commit Graph

10681 Commits

Author SHA1 Message Date
Bartosz Taudul
fb4dcd4e96 Switch macos CI runner to macos-latest. 2026-07-21 15:04:37 +02:00
Bartosz Taudul
d67cf385ff Merge pull request #1431 from alandtse/fix/mcp-live-worker-lock-race
fix(mcp): lock Worker reads vs receive thread
2026-07-20 12:04:36 +02:00
Bartosz Taudul
4ffc8b0dd2 Merge pull request #1430 from alandtse/fix/d3d11-zero-frequency-divide
fix(d3d11): guard collector against zero frequency
2026-07-20 12:04:07 +02:00
Alan Tse
5f2d14338e docs(mcp): fix eval-guide staleness
Two staleness gaps a cold agent would hit: get_sections()'s
documented {start, end, text} shape didn't match the actual
return value once category was added, and is_background_done()
-- introduced to close the stats-read race exercised while
testing the lock fix -- wasn't mentioned anywhere, so a cold
agent had no way to discover it short of dir(ctx).
2026-07-19 22:32:06 -07:00
Alan Tse
bfcec08e93 feat(mcp): expose background-load readiness
Smoke-testing the lock fix against a real 143M-zone capture
surfaced a second concurrent-mutation source: file loads spawn a
background thread that finishes populating zone/symbol statistics
after Worker construction returns, so get_all_zone_stats() et al.
could silently come back empty or partial with no way to tell
"not built yet" from "genuinely empty".

Adds is_background_done (a relaxed atomic, same as is_connected,
so no locked() wrapper needed) and surfaces it as background_done
in list_instances, with load_capture's docstring pointing callers
at it.
2026-07-19 22:32:04 -07:00
Alan Tse
15bc3fce1a fix(mcp): lock Worker reads vs receive thread
Every Worker-reading Python binding except save_worker() read
m_data's zones/plots/threads/etc. without taking
Worker::ObtainLockForMainThread(), racing the live receive thread
that mutates the same structures. This matches
alandtse/tracy#2: crashes only ever hit live instances, never
file-loaded ones (no concurrent writer there), and cluster right
after a big save_trace when the receive thread is catching up on
backlog.

Routes every Worker accessor through a new locked() wrapper using
the same cooperative lock TracyView.cpp already takes once per
frame, so reads can't race live writes without introducing new
stalls on the profiled client.
2026-07-19 22:32:04 -07:00
Alan Tse
dc9dfb2e65 fix(d3d11): guard collector against zero frequency
D3D11_QUERY_DATA_TIMESTAMP_DISJOINT can report Frequency == 0 even
when Disjoint == FALSE. Neither the initial CPU/GPU calibration
loop nor the per-frame Collect() path guarded against this, so
`timestamp * (1000000000 / disjoint.Frequency)` divides by zero
and crashes the profiled application with
EXCEPTION_INT_DIVIDE_BY_ZERO inside client instrumentation code.

Treats a zero frequency the same as an existing guard already does
for a disjoint result: skip/retry in calibration, and in Collect()
advance the checkpoint and drop the batch via TracyD3D11Panic,
matching the existing disjoint-timestamp handling immediately
above it.
2026-07-19 22:28:52 -07:00
Bartosz Taudul
ef099b0555 The UD- prefix is problematic in router mode. 2026-07-19 01:17:52 +02:00
Bartosz Taudul
956e082e5b ResetGraph lambda can't be static. 2026-07-18 15:33:43 +02:00
Bartosz Taudul
be6377f81b Constrain source view window size. 2026-07-18 14:51:41 +02:00
Bartosz Taudul
249b76f175 Do not display time, reason data for aggregate wait stacks. 2026-07-18 14:39:52 +02:00
Bartosz Taudul
6a916a6c9f Constrain zone info window size. 2026-07-18 14:31:15 +02:00
Bartosz Taudul
0f56c8ac7e Constrain callstack window size. 2026-07-18 14:19:33 +02:00
Bartosz Taudul
8a4876a071 Fix wrong formatting. 2026-07-18 14:15:14 +02:00
Bartosz Taudul
7539daa602 Constrain sample entry stacks window size. 2026-07-18 14:11:33 +02:00
Bartosz Taudul
ab46247a9c Constrain frame statistics window size. 2026-07-18 14:07:48 +02:00
Bartosz Taudul
7bc32a1536 Use sub-child in frame statistics window. 2026-07-18 14:07:22 +02:00
Bartosz Taudul
6858a664dc Constrain wait stacks window size. 2026-07-18 14:01:29 +02:00
Bartosz Taudul
3eae7a6d65 Constrain LLM window size. 2026-07-18 13:52:58 +02:00
Bartosz Taudul
64c0c5c85f Constrain compare window size. 2026-07-18 13:46:24 +02:00
Bartosz Taudul
74e1ddfbeb Constraint window memory size. 2026-07-18 13:42:14 +02:00
Bartosz Taudul
f472b92f13 Constraint statistics window size. 2026-07-18 13:40:20 +02:00
Bartosz Taudul
6c8dd9fd93 Constrain find zone window size. 2026-07-18 13:37:10 +02:00
Bartosz Taudul
8184964c2d Include sub-window padding and scrollbars. 2026-07-18 13:36:45 +02:00
Bartosz Taudul
eef8fac58b Constrain messages window size. 2026-07-18 13:21:35 +02:00
Bartosz Taudul
2d2487e2e0 Constrain flame graph window size. 2026-07-18 13:20:15 +02:00
Bartosz Taudul
562fea5564 Add DPI change notification method in View. 2026-07-18 13:17:42 +02:00
Bartosz Taudul
3608d0c271 Add imgui window size constraints helper. 2026-07-18 13:17:42 +02:00
Bartosz Taudul
f08792f217 Remove filtering for things that are no longer present. 2026-07-18 12:50:47 +02:00
Bartosz Taudul
87b838f553 Update manual. 2026-07-18 12:32:50 +02:00
Bartosz Taudul
ed39de8025 Update NEWS. 2026-07-18 12:23:14 +02:00
Bartosz Taudul
84c6548c94 Add option to group symbol flame graph items by name, not symaddr. 2026-07-18 12:20:38 +02:00
Bartosz Taudul
0b2e7dd13c Add StringIdx equality comparison operator. 2026-07-18 12:20:32 +02:00
Bartosz Taudul
eb12b62af6 Extract flame graph reset functionality. 2026-07-18 12:07:43 +02:00
Bartosz Taudul
91bababef7 Common path for both trees in sample entry stacks. 2026-07-17 22:24:58 +02:00
Bartosz Taudul
f13bb0bf52 Fix UI logic. 2026-07-15 02:09:34 +02:00
Bartosz Taudul
0caee2147c Update manual. 2026-07-15 01:20:14 +02:00
Bartosz Taudul
3e91ee15b1 Display FPS time range values in frame compare. 2026-07-14 23:56:28 +02:00
Bartosz Taudul
f7c63ac40c Display single FPS value in frame stats tooltip, if min and max are equal. 2026-07-14 23:55:44 +02:00
Bartosz Taudul
3d85d0468e Remove unneeded capture. 2026-07-14 21:28:33 +02:00
Bartosz Taudul
ff3c57c8d3 Category may exist while sections are not filled.
Dereference of end() iterator in section category options list
(profiler/src/profiler/TracyView_Options.cpp:152-153)

The new category list iterates categories = m_worker.GetSectionDescriptions()
(the description map) and then looks up each category in sections = m_worker.
GetSections():

for( const auto& v : categories )
{
    ...
    auto it = sections.find( v.first );
    ImGui::TextDisabled( "(%s)", RealToString( it->second.size() ) );
    ...
}

sectionsDescription is a superset of sections's keys: ProcessSectionSetup
(server/TracyWorker.cpp:7484-7496) inserts into sectionsDescription only,
while ProcessSectionEnter (server/TracyWorker.cpp:7416-7454) inserts into
both. A category set up via TracySectionSetup that has no TracySectionEnter
events yet (or a saved trace containing such a category) will be in
sectionsDescription but not in sections. find returns end() and
it->second.size() is undefined behavior (likely crash).
2026-07-14 21:21:45 +02:00
Bartosz Taudul
a501117392 Use proper data size. 2026-07-14 21:20:00 +02:00
Bartosz Taudul
916e62de17 Display count of sections in each category. 2026-07-14 19:17:22 +02:00
Bartosz Taudul
88c491e0f9 Add select/unselect all buttons to section categories list. 2026-07-14 19:14:55 +02:00
Bartosz Taudul
1a6b7781bd Update manual. 2026-07-14 19:13:01 +02:00
Bartosz Taudul
71810c4265 Update NEWS. 2026-07-14 19:13:01 +02:00
Bartosz Taudul
15fecdbf79 Display section category in section tooltips. 2026-07-14 19:13:01 +02:00
Bartosz Taudul
c1e8c7bac9 Implement disabling specific section categories. 2026-07-14 19:13:00 +02:00
Bartosz Taudul
03af70fd78 Add section categories descriptions accessor. 2026-07-14 19:13:00 +02:00
Bartosz Taudul
7933c00447 Add notification for when sections are hidden. 2026-07-14 19:13:00 +02:00