Commit Graph

9971 Commits

Author SHA1 Message Date
Bartosz Taudul
afcefc7855 Add llm tool for getting disassembly + profiling data for a symbol. 2026-05-11 22:23:29 +02:00
Bartosz Taudul
22ec55f1d5 Store View reference in TracyLlmTools. 2026-05-11 22:09:27 +02:00
Bartosz Taudul
c026c98bbb Source file name is not needed for gathering assembly data. 2026-05-11 22:01:25 +02:00
Bartosz Taudul
205983e87f Recalculate AddrStatData in AttachRangeToLlm.
For consistency, always provide the OS-level sampling data, not the hardware
samples.

Always disable inline propagation, which is intended as a local area help
for a human. It does not make sense in context of an llm.
2026-05-11 21:48:00 +02:00
Bartosz Taudul
c9a9bbdab2 Move Gather{Additional,}IpStats from TracySourceView to TracyDisassembly. 2026-05-11 21:22:53 +02:00
Bartosz Taudul
ae56d79c7e Extract disassembly line formatting to a separate function. 2026-05-11 21:11:39 +02:00
Bartosz Taudul
860724d794 Cosmetics. 2026-05-11 20:27:53 +02:00
Bartosz Taudul
40199a42b3 Properly emit empty cost separators when line addres is not in ipCountAsm. 2026-05-11 20:27:04 +02:00
Bartosz Taudul
7c6e656fda Use existing reference to array entry. 2026-05-11 20:01:40 +02:00
Bartosz Taudul
9611069a4f Remove guidance about user replies from assembly attachments. 2026-05-11 19:51:39 +02:00
Bartosz Taudul
825960553a Give reasoning for always providing source file name + line number. 2026-05-11 19:51:06 +02:00
Bartosz Taudul
325fe71d30 Move AddrStatData from TracySourceView to TracyDisassembly. 2026-05-11 19:22:37 +02:00
Bartosz Taudul
beec259520 Extract symbol code disassembly into a separate source file.
Two bugs fixed in the process:

1. X86_REG_BPL is now properly set (previously there were duplicate
   X86_REG_BP entries).
2. maxLine is now properly calculated, instead of being set to the
   last line value.
2026-05-11 01:30:28 +02:00
Bartosz Taudul
1dcad83790 Include call costs in assembly attachments. 2026-05-10 14:05:31 +02:00
Bartosz Taudul
8dd606009c Require window focus for z/x key activation in source view. 2026-05-10 13:24:20 +02:00
Bartosz Taudul
17b6656c85 Provide program optimization strategies for llm. 2026-05-10 12:44:49 +02:00
Bartosz Taudul
edb5241bee Be more efficient with missing values in asm attachments. 2026-05-10 11:35:31 +02:00
Bartosz Taudul
5cb283073e Store kernel symbol end address, not size.
The end address is now readily available in lower_bound search, instead
of needing to be calculated constantly in the lambda.

The size can be equivalently calculated from the end address, but this
only happens once, after the symbol is found.
2026-05-10 00:15:18 +02:00
Bartosz Taudul
a6c72f1cc7 Do not repeatedly read from all ring buffers to find minimum time entry. 2026-05-09 20:41:29 +02:00
Bartosz Taudul
95416a4b9c Since active[] order doesn't matter, memmove can be replaced with a swap. 2026-05-09 17:48:57 +02:00
Bartosz Taudul
f7ab78893c Don't query inline-symbol frames as native addresses.
Frames whose symbol data is shipped inline with the callstack payload
(sel=1, e.g. Lua-side stack entries) were being passed to
GetCanonicalPointer() in the AddCallstackAllocPayload() query loop,
tripping its sel==0 assertion. They have no native pointer to query
and were already registered in callstackFrameMap earlier in the same
function, so just skip them.

Regression from c704f909, which hoisted the per-call-site dedup into
QueryCallstackFrame(). Three of the four updated call sites were
equivalent before and after, because the old guard and the new one
keyed on the same value. The fourth, this one, was not: the old guard
tested the frame as-is and matched the entry inserted a few lines above,
short-circuiting before GetCanonicalPointer() ran. The new guard keys on
PackPointer(addr), so GetCanonicalPointer() must run first to compute
addr, and the assert fires.
2026-05-09 12:13:45 +02:00
Bartosz Taudul
7de27ebffa Force inline RingBuffer::Read(). 2026-05-09 01:05:33 +02:00
Bartosz Taudul
70535435f2 Use masking instead of calculating remainder.
size is power-of-two (asserted).
2026-05-09 00:58:16 +02:00
Bartosz Taudul
61a6fb6780 Batch ring buffer reads. 2026-05-09 00:50:50 +02:00
Bartosz Taudul
1bfd3beab9 Add "how to fix this crash?" preset question to call stack window. 2026-05-08 01:57:43 +02:00
Bartosz Taudul
b864ff47e5 Implement disabling LLM summary and suggestion. 2026-05-08 01:48:19 +02:00
Bartosz Taudul
4d34163ade Allow accepting chat suggestion via Enter or Send button. 2026-05-08 01:17:31 +02:00
Bartosz Taudul
8ce05917db Prevent stale summary after chat reset. 2026-05-08 01:07:59 +02:00
Bartosz Taudul
d59c1e7bd2 Prevent stale suggestion after chat reset. 2026-05-08 01:07:54 +02:00
Bartosz Taudul
6fb7f6d095 Add LLM chat suggestions. 2026-05-08 00:34:14 +02:00
Bartosz Taudul
db8bfc9ba9 Prevent in-flight query notification flicker. 2026-05-07 22:34:48 +02:00
Bartosz Taudul
305382453d Add callstack sample events with 32 and 16 bit timestamps. 2026-05-07 02:16:53 +02:00
Bartosz Taudul
ccaef5ba0b ZoneBegin / ZoneBeginCallstack with 32 and 16 bit time data. 2026-05-07 02:16:53 +02:00
Bartosz Taudul
4d094c108d Add zone end messages with 32 and 16 byte time deltas.
Change in test application:
    compressed data: 130 Mpbps -> 105 Mbps
    uncompressed: 830 Mbps -> 740 Mbps
2026-05-06 19:09:19 +02:00
Bartosz Taudul
b1768b98a5 Protocol was bumped to 77 after 0.13.1. 2026-05-06 01:37:54 +02:00
Bartosz Taudul
d6e77b3f40 Remove server query fast path.
The profiler will typically want to send bursts of queries (e.g. 3 queries
to retrieve source location strings, or multiple queries to get all the call
stack frames, etc.).

Each of these queries will be sent immediately, if available space in the
network buffer permits. Each of these sends is a separate syscall.

Remove this and instead batch all queries with the already existing network
buffer overflow handling functionality.
2026-05-06 00:42:24 +02:00
Bartosz Taudul
58eaa330af Set TCP_NODELAY on profiler data channel. 2026-05-06 00:12:21 +02:00
Bartosz Taudul
8c2a970222 Merge pull request #1352 from wolfpld/slomp/apple-systrace
System tracing (callstack sampling) for Apple devices
2026-05-05 19:05:41 +02:00
Bartosz Taudul
173c58bb6e Merge pull request #1353 from siliceum/fix/winsdk-compat
Fix #1243 compatibility with WinSDK < 10.0.26100
2026-05-05 18:05:51 +02:00
Marcos Slomp
6a214ed419 refactoring globals 2026-05-05 08:28:15 -07:00
Marcos Slomp
df20e8ad84 refactoring 2026-05-05 08:05:56 -07:00
Marcos Slomp
761d50e8f5 debug cleanup 2026-05-05 07:49:15 -07:00
Clément Grégoire
2997a78872 Fix #1243 compatibility with WinSDK < 10.0.26100
After investigating (downloading and installing) all publicly available SDKs at https://learn.microsoft.com/en-us/windows/apps/windows-sdk/downloads-archive I concluded the `TRACEHANDLE` deprecation started in `10.0.26100`.
This defines `PROCESSTRACE_HANDLE` and `CONTROLTRACE_ID` as done by the SDK when using older versions. Using `WDK_NTDDI_VERSION` (and not `NTDDI_VERSION` which may change based on `_WIN32_WINNT` or user input seems to be the most reliable way to do it. While it says "WDK" it's been part of the SDK in `shared\sdkddkver.h`. Note it doesn't work for MinGW because it updates half of its sdk files for some reason.
Tested with both 10.0.26100 and 10.0.22621.0 which is the last one I found without the new types.
Also changes CONTROLTRACE_ID to ULONG64 on mingw which is correct (type used by `TRACEHANDLE` too in mingw fe2763863a/mingw-w64-headers/include/evntrace.h (L60) )
2026-05-05 16:14:21 +02:00
Marcos Slomp
6b4ed90323 remove modern c++ 2026-05-04 21:43:27 -07:00
Marcos Slomp
ace8f18adb handle ARM64 PAC 2026-05-04 16:21:19 -07:00
Marcos Slomp
c877d0bcb4 TracySysTrace already manages the wprker thread lifetime... 2026-05-04 15:45:56 -07:00
Marcos Slomp
5a168f7ae4 initial prototype of system tracing for Apple devices 2026-05-04 15:29:24 -07:00
Bartosz Taudul
5bbafeabd7 Patch ppqsort to fix binary_semaphore release race. 2026-05-04 01:13:53 +02:00
Bartosz Taudul
04728994a5 Shorten external frames in call stack tooltips. 2026-05-04 01:05:02 +02:00
Bartosz Taudul
600227a30b More compact assembly code form.
For Qwen3.6-27B tokenizer:

AStar<> (3018 byte binary): 25546 -> 21099 tokens (82.6%)
LZ4_compress_fast_continue (10.47 KB): 84140 -> 69016 tokens (82%)
2026-05-02 16:31:59 +02:00