Commit Graph

379 Commits

Author SHA1 Message Date
Fan Chen
0eb3a82673 Move CUDA after Custom as existing traces may use the Custom identifier 2025-05-23 15:22:36 -04:00
Fan Chen
467f39b222 Add TracyCUDAStartProfiling and TracyCUDAStopProfiling macros 2025-05-22 15:38:40 -04:00
Fan Chen
8075a2c88f Add necessary Tracy macros 2025-05-17 14:55:02 -04:00
Fan Chen
67552743ba Add necessary Tracy macros 2025-05-17 13:35:23 -04:00
Fan Chen
0ef8bdd44d Fix wrapping everything inside #if TRACY_ENABLE / #else blocks 2025-05-17 13:23:39 -04:00
Fan Chen
f48ba426c2 Remove TODO: Replace it with CUDA type 2025-05-17 13:12:08 -04:00
Fan Chen
f0ae6ffe61 enclose everything inside #if TRACY_ENABLE / #else blocks 2025-05-17 13:09:48 -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
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
5140a5a411 Merge pull request #1021 from siliceum/wakeup
Thread wakeup visualization
2025-05-10 13:55:51 +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
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
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
4e282371bf Version 0.11.3 instead of 0.12.0 2025-04-08 13:51:32 +02:00
Clément Grégoire
6486d8147d Fix formating issues 2025-04-08 13:48:50 +02:00
Clément Grégoire
df76b376a7 Thread wakeup visualization
This PR does the following things:
- Allow to lock the highlighted thread using left mouse click or lane popup menu
- Add more descriptions for wait reasons in View::DecodeContextSwitchReason
- Stores the Wakeup CPU so that we may display it in the CPU data view
- `QueueThreadWakeup` now contains cpu and adjust info (currently unused). Fits in the padding, no struct size change.
- `QueueContextSwitch` now also contains thread priorities information (windows+linux) and CState (windows), but currently unused by the profiler. Fits in the padding, no struct size change.
- Fixes Linux `EventWakeup` which tries to remove PERF_SAMPLE_CALLCHAIN on the wrong member. Set the whole `perf_event_attr` explicitely instead.
- Fixes Windows ReadyThread event being dropped if triggered before the thread switches out (this is confirmed to be normal behaviour, probably due to thread being switched out but context switch actually happening later)
- Bumps tracy file version and protocol versions
2025-04-08 11:02:27 +02:00
Martijn Courteaux
bb474a12c7 Adjust LockMark() macro to allow member access expressions, like LockMark(object.mutex); 2025-03-28 16:08:53 +01:00
Julius Range-Lüdemann
eb47afe1f0 Handle callstack of zero in Vulkan and Direct3D 11
With TRACY_CALLSTACK set to 0 when not defined, these gpu functions get
called with depth=0. In other places this was alread fixed.
2025-03-10 21:38:59 +01:00
AnthoFoxo
54dcbc87ad implement lua hook function 2025-02-26 21:09:31 -05:00
Marcos Slomp
5c069f9d8d quick-fix for TracyD3D11.hpp
Apparently, waiting for an enclosing query does not guarantee that the inner queries also become readily available... Need to wait for them too.
2025-02-10 09:13:33 -08:00
Thomas Klausner
7272f9cac1 Use correct header on NetBSD. 2025-01-20 14:10:34 +01:00
Bartosz Taudul
27689bcf43 Merge pull request #962 from foxtran/feature/fortran-support
Add initial native Fortran support
2025-01-09 13:18:57 +01:00
Igor S. Gerasimov
802bdbbecc Fix type(c_ptr) in bind(C) 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
fd33d1c839 Add support of Oracle Sun 12.6 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
21c8d7615d Add colors 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
f01973a78c Reset srcloc variables 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
4273d34ca4 tracy_source_location_data must be public 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
fb9686fb28 Prettify code 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
9b14656c8a Add null char 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
38e7024277 Add plot formats 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
7730ac595f Add fibers support 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
82460b0316 Use simpler typename of context 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
caabfc6379 Implement plots 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
49cc094869 Implement tracy_appinfo 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
fbc40e8b9e Implement frame related things 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
4d5cd252a4 Add messages 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
59116feb55 Implement memory operations 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
4fd6d5317b Implement tracy_connected 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
07cd1d8ee1 Implement zone_set_properties 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
ead67c06d9 Add zone begin/end 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
1d627c86be Implement tracy_alloc_srcloc 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
66a50a8c76 Add TRACY_MANUAL_LIFETIME routines 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
3488e08aa7 Add Tracy structures except lockable 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
d16986dfa7 Add tracy_set_thread_name 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
e981a5ba6f Add initial module file 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
7093eb0b08 Update int for ___tracy_after_try_lock_lockable_ctx 2025-01-02 14:33:09 +01:00
Igor S. Gerasimov
7e128f3bce Update int for ___tracy_emit_plot_config 2025-01-02 14:32:04 +01:00