Commit Graph

20 Commits

Author SHA1 Message Date
Basil Milanich
16cdf3d645 Merge remote-tracking branch 'origin/master' into rocm-on-demand-fix
# Conflicts:
#	public/client/TracyRocprof.cpp
2026-06-08 09:43:07 -05:00
Bartosz Taudul
20e6835da6 Fix remaining MemWrites. 2026-06-05 00:00:04 +02:00
Basil Milanich
ebd3d9c3e6 Also defer GpuContextName for on-demand profiling
Without this, a late-connecting client receives the deferred
GpuNewContext but not the GpuContextName, so the GPU context appears
unnamed in the profiler.

Add check_gpu_ctx_name tool to verify context names in captured traces.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 09:27:47 -05:00
Basil Milanich
b049746853 Fix on-demand profiling support for rocprofiler backend
Two issues prevented the rocprofiler GPU backend from working with
TRACY_ON_DEMAND:

1. GpuNewContext not deferred: When a Tracy client connects late (on-demand
   mode), it never receives the GPU context creation message because the
   GpuNewContext queue item was not buffered via DeferItem. This caused an
   assertion failure (ctx == nullptr) in the capture/profiler when
   processing GPU zone events. Add the same DeferItem pattern used by the
   CUDA backend.

2. Kernel symbols dropped before init: The data->init guard at the top of
   tool_callback_tracing_callback() blocked kernel symbol registrations
   (CODE_OBJECT_DEVICE_KERNEL_SYMBOL_REGISTER) which happen at HIP init
   time, before any Tracy client connects. Move the init guard after the
   code_object block so symbols are always recorded, while dispatch and
   memory-copy events are still gated on initialization.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 15:56:31 -05:00
Eric Eaton
1639598d62 Update documentation
This provides some instructions and tips for the manual. Also:
* Made the calibration feature a CMake option
* Cleaned up some minor code issues
* Fixed an issue with the calibration
* Incremented patch number
2025-07-21 15:30:42 -07:00
Eric Eaton
0c77bfcbed Use tracy data structures 2025-07-11 17:18:17 -07:00
Eric Eaton
114f6ef096 Supply the correct thread ID for annotations 2025-07-11 17:18:17 -07:00
Eric Eaton
d4a35c5ab1 Change rocprof context name 2025-07-11 17:18:07 -07:00
Eric Eaton
3fce5c1280 Use a map to record counter values
This removes the limitation of 10 counters.
2025-07-11 17:17:05 -07:00
Eric Eaton
6a5e4d8a60 Use assert intead of a condition 2025-07-11 17:17:05 -07:00
Eric Eaton
1494fe5671 Apply code style 2025-07-11 17:17:05 -07:00
Eric Eaton
d1f9df8058 Get counter names from environment variable
Allows user to customize the collected information with environment
variable TRACY_ROCPROF_COUNTERS.
2025-07-11 17:16:00 -07:00
Eric Eaton
e9e0404930 Add support for multiple counters 2025-07-11 17:16:00 -07:00
Eric Eaton
a754db16f8 Show counter name in GUI 2025-07-11 17:16:00 -07:00
Eric Eaton
2e49bdf4cb Add counter value collection 2025-07-11 17:16:00 -07:00
Eric Eaton
86de39704f Add calibration thread
Synchronizes the GPU timeline periodically. This is needed to counter
network time updates that cause drift in the GPU and CPU timeline.

Signed-off-by: Eric Eaton <erieaton@amd.com>
2025-07-11 17:16:00 -07:00
Eric Eaton
495321fc10 Record dispatch enqueue times 2025-07-11 17:16:00 -07:00
Eric Eaton
98047ffbe2 Delay initialization
Delay initialization until tracy is started. Removed some debug prints.
2025-07-11 17:16:00 -07:00
Eric Eaton
1517756d54 Add buffer copy tracing 2025-07-11 17:16:00 -07:00
Eric Eaton
00648836a2 Add rocprof dispatch tracing 2025-07-11 17:16:00 -07:00