Commit Graph

8711 Commits

Author SHA1 Message Date
Fan Chen
ac6f2e56e6 add CUDA to list of supported GPU compute APIs 2025-05-17 13:06:16 -04:00
Fan Chen
abaaa8c1b1 Bump up protocol version 2025-05-17 12:59:27 -04:00
Fan Chen
62dd2c887e Replace GPU context type with CUDA 2025-05-17 12:57:53 -04:00
Fan Chen
8643d0f1cc Add CUDA queue type 2025-05-17 12:56:19 -04:00
Fan Chen
b52fa7d8ef Add tracy cuda header file including necessary Tracy Macros 2025-05-17 12:54:52 -04:00
Bartosz Taudul
c530219e46 Merge pull request #1047 from siliceum/nocrash-on-max-source-loc
Fix crash when reaching the source location limit
2025-05-12 17:03:39 +02:00
Clément Grégoire
c100b32b48 Fix crash when reaching the source location limit
Instead of crashing when reaching the maximum number of source locations, display an empty source location ( with "???" everywhere).
Keeping the assert for discoverability of the limit in debug, but ensure profiler won't crash later on (or in release).
2025-05-12 13:49:31 +02:00
Bartosz Taudul
a8d6707368 Merge pull request #1045 from siliceum/fix-delay-loading
Fix delay loading by not exporting variables
2025-05-12 13:21:17 +02:00
Clément Grégoire
10c6e3dee1 Fix delay loading by not exporting variables
[`/DELAYLOAD`](https://learn.microsoft.com/en-us/cpp/build/reference/delayload-delay-load-import?view=msvc-170) only works with exported functions, not variables (as it patches thunks after the first load).
So instead of using exporting a pointer for `___tracy_RtlWalkFrameChain`, make it a function that will call said pointer. This only adds a `mov`+`jmp` instructions in optimized builds to the call, which is negligible compared to the actual cost of RtlWalkFrameChain. This also does not affect the reported callstack since it will use a `jmp` without touching the stack, so `___tracy_RtlWalkFrameChain` won't appear in the capture stacktrace.
2025-05-12 11:56:38 +02:00
Bartosz Taudul
53510c316b Update nfd-extended to 1.2.1, retrieve via CPM. 2025-05-11 14:16:20 +02:00
Bartosz Taudul
fc9b39e26d Bump ImGui to 1.91.9b-docking. 2025-05-11 13:50:34 +02:00
Bartosz Taudul
5140a5a411 Merge pull request #1021 from siliceum/wakeup
Thread wakeup visualization
2025-05-10 13:55:51 +02:00
Bartosz Taudul
3ff5e9b128 Merge pull request #1041 from tvoeroes/fix-some-too-small-buffers
fix some string buffer sizes
2025-05-10 00:31:08 +02:00
Tomaž Vöröš
a088ebe337 fix some buffer sizes 2025-05-10 00:27:32 +02:00
Clément Grégoire
0ce3b05d64 Fix issues with timeline highlight code when IsMouseClickReleased is called
`HandleTimelineMouse` did the following
- `m_highlight.active = true` when clicked
- update range while dragging
- `m_highlight.active = false` when not dragging

This causes issues when `IsMouseClickReleased` is called somewhere else as
- `mousePotentialClickRelease` is set to true on click
- At beginning of frame, `mouseDragging` is set to `false` as long as `mousePotentialClickRelease` is `true` and mouse delta is under the drag threshold
- This means that if the mouse didn't move enough in the duration of a frame, highlight would immediately stop, even though we were still holding the mouse button down

Instead, it now only stops highlighting once the mouse is no longer down (ie: has been "released", cursor having moved or not)
2025-05-07 15:37:56 +02:00
Clément Grégoire
2c2d126967 Remove added spaces 2025-05-05 15:52:54 +02:00
Clément Grégoire
58401a93ab Fix file read when skipping context switches data 2025-05-05 15:29:30 +02:00
Bartosz Taudul
a03c7580b9 Merge pull request #1038 from simonvanbernem/save-ui-scale
Added saving of user ui scale via global configuration.
2025-04-28 17:02:54 +02:00
Simon van Bernem
132a4ba320 Revert "The config is now always saved on exit."
This reverts commit 6b03d1dd9e.
2025-04-28 17:01:29 +02:00
Simon van Bernem
6b03d1dd9e The config is now always saved on exit. 2025-04-28 15:37:04 +02:00
Simon van Bernem
7474127bbb Fixed typo 2025-04-27 21:38:23 +02:00
Simon van Bernem
a277453acb Added saving of user ui scale in the global configuration. Moved userScale into s_config. Prevented "Get started" and "Loading trace..." windows from having their position saved between restarts, because if you change scale and then restart, they might get pushed to the edge of the window, which is confusing. 2025-04-27 21:33:08 +02:00
Bartosz Taudul
cc0c53496d Merge pull request #1037 from simonvanbernem/per-monitor-dpi
Adding per-monitor DPI awareness
2025-04-25 21:37:55 +02:00
Simon van Bernem
a150fdfc35 Adding per-monitor DPI awareness by using glfwGetWindowContentScale instead of glfwGetMonitorContentScale and ensuring that the window is also resized appropriately by using GLFW_SCALE_TO_MONITOR 2025-04-25 19:44:30 +02:00
Clément Grégoire
859aa9fbf0 Fix missing return and formating in DecodeContextSwitchReason 2025-04-25 17:43:29 +02:00
Clément Grégoire
b906430f50 Thread wake up vertical par now uses half pixel offset 2025-04-24 12:23:27 +02:00
Bartosz Taudul
753305a797 Merge pull request #1031 from shtanko-sv/csvexport-values
Add exporting user values into CSV
2025-04-17 12:46:18 +02:00
Sergey Shtanko
0039895398 Add exporting user values into CSV 2025-04-17 11:11:02 +01:00
Bartosz Taudul
1fc7c9f160 Merge pull request #1024 from siliceum/update-batch-addr2line
tracy-update: Batch addr2line calls per 1024 addresses and escape paths
2025-04-14 17:04:02 +02:00
Clément Grégoire
f02c6fe4d5 Batch addr2line calls per 1024 addresses and escape paths
addr2line starts failing when given too many addresses to resolve.
Batching per 1024 addresses allows not only to see progress but also fixes resolution for images with high number of addresses to resolve.
Escaping is also required when image paths have spaces for example.
2025-04-14 15:39:26 +02:00
Bartosz Taudul
0d1d28415c Merge pull request #1022 from siliceum/TracyLine-Evaluate-to-a-constant
Change TracyLine to be evaluate as a constant even with Edit-and-Cont…
2025-04-14 15:00:52 +02:00
Clément Grégoire
66bdc49c17 Only change selected thread when clicking in cpudata zone ( m_drawThreadHighlight can be set when hovering, and thus clicking, a thread lane name) 2025-04-14 01:17:08 +02:00
Clément Grégoire
a3102ef26b Fix wakeup line DPI handling and offset 2025-04-13 19:59:52 +02:00
Clément Grégoire
66c21b0b8e Rewrite thread selection, now correctly unselecting only if clicking the CPU data timeline, and can unselect from the thread timeline menu 2025-04-13 19:59:52 +02:00
Clément Grégoire
8647bbf6c0 Allow to select any thread, not just the ones from the profiled program 2025-04-13 19:59:45 +02:00
Clément Grégoire
52caa57f6f Fix switched-in thread lookup (End() can be invalid) 2025-04-13 19:59:04 +02:00
Clément Grégoire
83869c6f76 Replace sched_wakeup by sched_waking
`sched_wakeup` notifies about the kernel saying it will be waking up the thread, not the reason for the actual wakeup. This only allows to measure the scheduling latency, not the full wake up latency.
Instead, use `sched_waking` which is triggered on the ring of the CPU and thread responsible for the wakeup. `target_cpu` contains the cpu on which the thread will be woken up.
2025-04-13 19:59:03 +02:00
Bartosz Taudul
54d6dd9662 Merge pull request #1023 from slomp/master
More context about the MSVC "Edit and Continue" issue
2025-04-12 16:50:20 +02:00
Marcos Slomp
195d79fc67 More context about the MSVC "Edit and Continue" issue 2025-04-12 07:38:19 -07:00
Gabriel Bon
f41c4672cb Change TracyLine to be evaluate as a constant even with Edit-and-Continue 2025-04-10 09:26:47 +02:00
Clément Grégoire
6f776b7c6b Introduce "selected thread" instead of locking highlighted one 2025-04-09 22:42:02 +02:00
Clément Grégoire
413055f8d5 Only prompt to highlight thread if cpu usage graph is enabled 2025-04-09 17:20:18 +02:00
Clément Grégoire
296a3bb590 Add a comment about where to find KWAIT_REASON 2025-04-09 17:15:31 +02:00
Clément Grégoire
31859042bd Remove ContextSwitchData SetStartCpu and SetEndReasonState 2025-04-09 17:02:51 +02:00
Clément Grégoire
2783e6e64b Add information about the context switch when hovering the thread in the cpu data timeline 2025-04-09 16:56:20 +02:00
Clément Grégoire
d4edd107dc Fix wake up draw for the first known context switch of the thread
We were never drawing the wakeup of the very first known context switch.
2025-04-09 16:52:46 +02:00
Clément Grégoire
b6ec625ab4 Remove assert that would trigger on dropped CSwitch events 2025-04-09 14:45:03 +02:00
Clément Grégoire
fdff47ecdb Add culling for the thread wakeups 2025-04-09 14:40:25 +02:00
Clément Grégoire
40047c1eb6 Fix sign of time input (would lead to bad position computations due to always unsigned delta results) 2025-04-09 14:06:41 +02:00
Clément Grégoire
b0375776b5 Address documentation comments 2025-04-08 16:57:02 +02:00