Commit Graph

1649 Commits

Author SHA1 Message Date
Bartosz Taudul
05c2638467 Remove option to build profiler GUI with no statistics. 2026-05-24 15:07:53 +02:00
Bartosz Taudul
5c0263c2f0 Disable display of hw samples by default. 2026-05-24 14:57:31 +02:00
Bartosz Taudul
5fd0dc569b Make impact option active only if hw samples are enabled. 2026-05-24 14:55:59 +02:00
Bartosz Taudul
ec1c2d4267 Display aggregation counts in bottom / up sample trees. 2026-05-24 14:23:59 +02:00
Bartosz Taudul
b7e405ebbd Use proper wait stacks grouping variable. 2026-05-24 14:15:53 +02:00
Bartosz Taudul
e8a0676c0b Fix regression that made propagate inlines always disabled if no child calls. 2026-05-24 13:35:48 +02:00
Bartosz Taudul
6eb9bf81ad Fix out of bounds read. 2026-05-23 13:40:18 +02:00
Bartosz Taudul
f99a02505a Fix possible div-by-zero.
If as.ipMaxAsm.local is 0 and m_childCalls is false, GetHotnessColor(count, 0)
performs float(2 * count) / 0. The old code explicitly guarded against this
with the as.ipMaxAsm.local != 0 check.
2026-05-23 13:33:16 +02:00
Bartosz Taudul
f63c25fb79 Add glow to gutter markers. 2026-05-23 13:11:02 +02:00
Bartosz Taudul
a0af290db5 Rework symbol view gutter markers logic. 2026-05-23 12:26:24 +02:00
Bartosz Taudul
65db47ed0d Implement viewing assembly attachments. 2026-05-23 01:35:11 +02:00
Bartosz Taudul
d06c4ce816 Fix broken callstack display in zone tooltips if no local functions. 2026-05-23 00:37:57 +02:00
Bartosz Taudul
c91215bd99 Add function for checking if there are local functions in a callstack. 2026-05-23 00:30:47 +02:00
Bartosz Taudul
dfac4cb8a4 Defer initial system prompt update to the first draw. 2026-05-22 19:15:47 +02:00
Bartosz Taudul
34a1bb6107 DrawSourceTooltip() doesn't work with free-floating strings. 2026-05-22 17:54:26 +02:00
Bartosz Taudul
6957f968a4 Include trace time span in llm system message. 2026-05-22 02:06:58 +02:00
Bartosz Taudul
896cdc9462 Fade-out outdated assistant replies.
The "outdated" concept is strictly for chain of assistant replies with
nothing in between, i.e.:

"I will check this..."      <- outdated
<tool call>                 <- not displayed
"Now I will do that..."     <- outdated
<tool call>                 <- not displayed
"Let me consider..."        <- outdated
<reasoning>                 <- not displayed
"Now I have the answer..."

The first three messages are at this point considered outdated, as the
model provided a more recent message.

Note that in chain such as below there are NO outdated messages:

"How can I help..."
<user input>
"Ah, I see..."
<user input>
"You may try to..."

Similarly, if the tool calls or reasoning sections are explicitly enabled
in the chat UI, the messages are also not considered outdated.
2026-05-21 21:23:14 +02:00
Bartosz Taudul
efc33a09d9 Fix potential issue with last chat turn detection. 2026-05-21 20:51:58 +02:00
Bartosz Taudul
61875e1bd0 Add LLM tool for listing sampling statistics. 2026-05-21 20:27:54 +02:00
Clément Grégoire
69855a1416 Prevent unlimited recursion leading to stack overflow
This can happen notably when the user does not call ZoneEnd.

I used 256 arbitrarily as it seemed higher values would just make the UI freeze anyway due to perf reasons.
I added a warning in the notification area so that users can locate it.
2026-05-21 09:38:43 +02:00
Bartosz Taudul
60247b68d3 Merge pull request #1364 from siliceum/fix/zone-runtime
Fix and refactor zone running time
2026-05-20 19:29:29 +02:00
Clément Grégoire
91c0b1e42b Fix and refactor zone running time
Many of the zones would have a negative running time due to a missing `cs->IsEndValid()` check.
This could end reporting context switches before the zone start, due to `cs->End()` returning -1.

This happened when systrace dropped event, or when using Fibers and `TracyFiberEnter` is called on the new thread once the fiber has been scheduled. (The manual actually does not really hint this is wrong, we should probably fix the manual or the server code.)

In both cases, we assume runtime to be 0 for that context switch. Since we have no actual information. Both options (counting full runtime or no runtime) are wrong, and most of the code handling `!cs->IsEndValid()` uses `Start` instead so that's what I did. This is still a net improvement over displaying negative values. If we want to change this handling, we'd need to review the other places that do `it->IsEndValid() ? it->End() : it->Start()` as well.

It also seems two different concepts were being mixed:
1. Do we have any context switch data at all ? (`it != ctx->v.end()` ie `count != 0`)
2. Do we have complete data for the last context switch (`eit != ctx->v.end()`)

This led to some places of the code not displaying or counting running time at all, notably when hovering a zone.

I think most of the time we wanted 1, as it reports correctly and assumes the last context switch is still running, which is a fair assumption if we didn't see one putting the thread to sleep.

I also fixed a case where we were overcounting runtime when range start was during a sleep.
2026-05-20 12:02:38 +02:00
Bartosz Taudul
14a1a3227e Add guidance about function context. 2026-05-20 02:26:14 +02:00
Bartosz Taudul
8582715fa5 Add information about addresses in callstacks. 2026-05-20 02:26:14 +02:00
Bartosz Taudul
d51634ad24 Include ip and base addr in json callstack frames. 2026-05-20 02:26:14 +02:00
Bartosz Taudul
4bbfe5edbd Add tool for getting symbol parent calls. 2026-05-20 02:26:14 +02:00
Bartosz Taudul
55c5348fad Make GetCallstackJson public. 2026-05-20 00:41:20 +02:00
Bartosz Taudul
5b4dcd4655 Add support for parent callstacks to GetCallstackJson. 2026-05-20 00:27:24 +02:00
Bartosz Taudul
a380046e17 Switch symbol disassembly tool to use symbol address parameter. 2026-05-19 23:52:20 +02:00
Bartosz Taudul
6494285283 Include hex address ofthe symbol in disassembly json. 2026-05-19 23:41:36 +02:00
Bartosz Taudul
07b2600c08 Do not spam wikipedia. 2026-05-19 21:58:15 +02:00
Bartosz Taudul
1f1738c221 Make glow bigger. 2026-05-18 01:00:38 +02:00
Bartosz Taudul
cf5325032e Make the symbol view hotness indicators more chonky.
The previous uniform glow rectangle was not appropriate anymore, so the
glow was changed to be a proper gradient.
2026-05-17 21:53:06 +02:00
Bartosz Taudul
365c99e601 Restore frameData->imageName.Active() checks. 2026-05-17 18:58:29 +02:00
Bartosz Taudul
b8f68e3fae Add local call stacks to sample statistics inlines list. 2026-05-17 18:13:52 +02:00
Bartosz Taudul
5d4ba366ba DrawSourceTooltip reports if source was printed. 2026-05-17 17:58:22 +02:00
Bartosz Taudul
a7937d2710 Move local callstack printing to a separate function. 2026-05-17 17:56:14 +02:00
Bartosz Taudul
efd7ec262d Set default LLM address to llama.cpp port. 2026-05-17 17:50:33 +02:00
Bartosz Taudul
4c6157d249 Remember last retrieved external check result. 2026-05-17 15:43:26 +02:00
Bartosz Taudul
6ae6fb741e Check if image is external once, before checking subframe filenames.
Cache is shared between image names and source file names, because the
underlying StringIdx storage makes indices unique. Both name sets should
be completely separate, but if you have conflicts here, you have much
more pressing problems to solve.
2026-05-17 15:30:03 +02:00
Bartosz Taudul
b18d81cbbe Explicitly state which code paths are important to consider. 2026-05-17 14:08:54 +02:00
Bartosz Taudul
03e60c902f Clamp max percentage bar width. 2026-05-16 13:30:51 +02:00
Bartosz Taudul
0b88cbaa3c Fix z/x keys in source view when the child panes (src/asm) are focused. 2026-05-16 13:29:26 +02:00
Bartosz Taudul
5b180fdd5f Restore const qualifiers dropped in 744bd21 for global cache. 2026-05-14 22:59:10 +02:00
Bartosz Taudul
03f737a923 Use local external frame cache in BuildFlameGraph.
In terms of how much BuildFrameGraph execution time was spent in
IsFrameExternal:

1. no cache: 67%
2. global + shared_mutex: 84%
3. global + mutex: 80%
4. local: 41% (this commit)
2026-05-14 22:44:59 +02:00
Bartosz Taudul
a3cadb2fce Protect against localtime failures. 2026-05-14 22:06:22 +02:00
Bartosz Taudul
6789e7d6f9 Cosmetics. 2026-05-14 20:36:55 +02:00
Bartosz Taudul
c3e3ea98ad Add basic information about the profiling session to system prompt. 2026-05-14 19:51:42 +02:00
Bartosz Taudul
c11c36f9f7 Add trace filename and user data accessors to View. 2026-05-14 19:51:41 +02:00
Bartosz Taudul
150ec1534c Store View in TracyLlm. 2026-05-14 19:51:41 +02:00