Commit Graph

91 Commits

Author SHA1 Message Date
Bartosz Taudul
f5526d01a2 Merge pull request #1385 from nitrix/bump-cmake-313
Bump CMake min version to 3.13
2026-06-05 00:01:22 +02:00
Alex Belanger
21434e9877 Bump CMake min version to 3.13 2026-06-04 00:27:43 -04:00
Bartosz Taudul
4e593d91f5 Enable color diagnostics when building library. 2026-06-03 23:48:05 +02:00
Clément Grégoire
aaf1304308 Options.cmake: unify set_options* and tracy_set_options
Renamed `tracy_*` versions to short version without prefix
2026-05-26 12:50:19 +02:00
Clément Grégoire
f93d17a96f Add TRACY_PLATFORM_HEADER hook for unsupported platforms.
Extension point so private/unsupported platforms can plug in their own implementations of the kernel/libc primitives Tracy depends on, without patching the `#if`/`#elif` chains.

Projects supply a platform header via `-DTRACY_PLATFORM_HEADER="\"my_platform.h\""` at build time. Tracy includes it in any TU that needs the hooks. The header toggles per-category `TRACY_HAS_CUSTOM_*` macros and declares matching `tracy::Platform*` functions.

Available hooks:

- `TRACY_HAS_CUSTOM_THREAD_ID` → `PlatformGetThreadId`
- `TRACY_HAS_CUSTOM_USER_INFO` → `PlatformGetHostname`, `PlatformGetUserLogin`, `PlatformGetUserFullName`
- `TRACY_HAS_CUSTOM_SAFE_COPY` → `PlatformSafeMemcpy`
- `TRACY_HAS_CUSTOM_ALLOCATOR` → `PlatformMalloc`, `PlatformFree`, `PlatformRealloc`, `PlatformAllocatorInit`, `PlatformAllocatorThreadInit`, `PlatformAllocatorFinalize`, `PlatformAllocatorThreadFinalize`

Each hook is wired as the first arm of its respective `#if`/`#elif` chain, so existing supported platforms are unaffected.

Template files in `examples/CustomPlatform/` and a new subsection in `manual/tracy.tex` document the mechanism.
2026-05-24 15:42:42 +02:00
Clément Grégoire
84570487bf Move CMake option wrappers into cmake/options.cmake.
Move `tracy_set_option` and `tracy_set_option_value` from `CMakeLists.txt` into `cmake/options.cmake`. Add `tracy_set_option_value_as_string` for options whose value is embedded as a C string literal. All three accept an optional trailing target argument; when provided, the option is also propagated as a PUBLIC compile definition on that target.

Existing `set_option`/`set_option_value` are unchanged but will be replaced later by the `tracy_*` versions.
2026-05-24 15:42:42 +02:00
Clément Grégoire
ca076b4a60 Add TracyMangle.hpp file to centralize config name mangling
Also rename MANGLED_NAME_BASED_ON_DEFINES => MANGLED_NAME_BASED_ON_CONFIG
2026-04-21 13:28:48 +02:00
Bartosz Taudul
010d25be06 Merge pull request #1332 from Brainzman/fix-missing-installed-include
Fix missing TracyTaggedUserlandAddress.hpp include due to it not being installed
2026-04-11 13:15:24 +02:00
Jonas Holzman
0de97789dd Fix missing TracyTaggedUserlandAddress.hpp due to it not being installed
Currently including the Tracy.hpp header from a set of installed Tracy
headers will result in the following error:

In file included from <...>/tracy/include/tracy/tracy/Tracy.hpp:133:
In file included from <...>/tracy/include/tracy/tracy/../client/TracyLock.hpp:9:
In file included from <...>/tracy/include/tracy/tracy/../client/TracyProfiler.hpp:18:
<...>/tracy/include/tracy/tracy/../client/../common/TracyQueue.hpp:6:10: fatal error: 'TracyTaggedUserlandAddress.hpp' file not found
    6 | #include "TracyTaggedUserlandAddress.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Apparently introduced in f981330, which included the
TracyTaggedUserlandAddress.hpp header in TracyQueue.hpp without adding
it to the list of installed common header. Fixed by making the necessary
CMake change to install the header.

Ran into this issue while integrating Tracy as a dependency within
Blender[^1], where we use the latest main instead of stable for WoA
support, and use the install target to harvest the static lib and
headers for our libraries.

[^1]: https://projects.blender.org/blender/blender/pulls/156661
2026-04-11 12:27:40 +02:00
Bartosz Taudul
f71c74aaf7 Change TRACY_ENABLE default to OFF to match documentation.
The documentation states that Tracy is disabled by default, but the
build system defaults were ON/true. Change CMake and Meson defaults to
OFF/false. Projects that need profiling enabled must now opt in
explicitly. Add explicit TRACY_ENABLE=ON / tracy_enable=true to CI
steps and the test project to preserve existing behavior.
2026-04-10 18:49:04 +02:00
Bartosz Taudul
44b1de2d71 Target win10 with mingw. 2026-04-03 02:11:16 +02:00
Bartosz Taudul
b6b1eed1d5 Externalize option setting macros. Add one for non-booleans. 2026-03-31 23:15:14 +02:00
Bartosz Taudul
a51efcc974 Proper CMake setup for TRACY_CALLSTACK. 2026-03-15 22:17:26 +01:00
Clément Grégoire
d089c3e1b0 CMake: Enforce TRACY_TIMER_FALLBACK when TRACY_DISALLOW_HW_TIMER is set. 2026-02-09 11:40:07 +01:00
Clément Grégoire
b27561c21e Add TRACY_DISALLOW_HW_TIMER for VMs / WSL2 2026-02-08 17:10:24 +01:00
Bartosz Taudul
5bc2e4b95c Implement full user name retrieval on win32. 2025-12-30 15:17:08 +01:00
Clément Grégoire
f17bd3f444 TracyDebug now uses TracyInternalMessage by default unless TRACY_VERBOSE or TRACY_NO_INTERNAL_MESSAGE is defined 2025-12-28 15:00:59 +01:00
Trevor L. McDonell
d1b0406801 Add option to ignore memory free faults
This replaces the IsApple flag, which was previously only used for this purpose.
2025-12-02 16:16:50 +01:00
AnyOldName3
0da827ba34 Don't use separate directory for Release library 2025-08-03 14:46:13 +01:00
AnyOldName3
e4fcc1fdea Use config-specific lib dir so files don't overwrite each other 2025-08-01 00:23:47 +01:00
Bartosz Taudul
c03fdaec1e Merge pull request #1097 from erieaton-amd/rocprofv3-2
Collect dispatches and counter values with Rocprofv3
2025-07-22 13:33:15 +02: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
Patrik Kraif
4a3713cca8 Add support for GDK 2025-07-16 12:51:16 +02:00
Eric Eaton
3324b46dca Make rocprof optional 2025-07-11 17:18:16 -07:00
Eric Eaton
00648836a2 Add rocprof dispatch tracing 2025-07-11 17:16:00 -07:00
Bartosz Taudul
a0b2a1d4bc Add TracyCUDA.hpp to CMake include list. 2025-06-07 13:35:44 +02:00
Bartosz Taudul
09558a0347 Set proper tracy include dir in CMake config. 2025-06-07 13:33:00 +02:00
Raven Szewczyk
7f56f1d182 Add TracyMetal.hmm to the installed headers list in CMake 2025-06-06 13:17:32 +01:00
Xnum
40d12b6a53 Changed CMakeLists.txt 2025-02-18 23:38:25 +01:00
Igor S. Gerasimov
b87a935c58 Allow global setting of CMAKE_INTERPROCEDURAL_OPTIMIZATION 2025-01-11 19:35:39 +01:00
Igor S. Gerasimov
7c48baf132 Add Link-Time optimization option 2025-01-11 16:33:01 +01:00
Igor S. Gerasimov
2608c6bbc9 Use whitespaces only 2025-01-11 16:15:33 +01:00
Igor S. Gerasimov
a42ea071a0 Add support of Cray compilers 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
a30fff8b4c CMake support of Fortran bindings 2025-01-05 23:21:12 +01:00
Igor S. Gerasimov
caf0047367 Catch disabled TRACY_DELAYED_INIT when TRACY_MANUAL_LIFETIME is enabled 2024-12-27 08:58:00 +01:00
Bartosz Taudul
4497201928 Merge pull request #899 from Jan200101/PR/header-merge
Install header files into one folder
2024-10-02 22:55:31 +02:00
Jan200101
f45dc88bf8 Install header files into one folder
all headers from one project are best kept in one place
2024-10-02 22:51:01 +02:00
Jan200101
4490f9cb41 Export cmake config into library directory
because the target contains architecture dependent information (for example library path) its best to store it in an architecture dependent path
2024-10-02 22:50:06 +02:00
Bartosz Taudul
6721db8600 Proper way of enabling libdebuginfod. 2024-09-27 19:59:40 +02:00
Eyck Jentzsch
f5bc9a9ae8 adds target export to allow use in projects using exports 2024-08-21 22:46:15 +02:00
Timo Suoranta
0aa025c0d9 Fix for #847 2024-07-26 11:24:20 +03:00
Bartosz Taudul
684cee59ab Merge pull request #841 from aluaces/pr-find-libunwind
Find libunwind if requested so we can link to it.
2024-07-23 13:13:18 +02:00
Alberto Luaces
d9a182b450 Find libunwind if requested so we can link to it. 2024-07-23 12:15:36 +02:00
Grégoire Roussel
c9063fbdbe Expose TRACY_VERBOSE in cmake for debug 2024-07-21 17:37:57 +02:00
Bartosz Taudul
521e371c60 Ignore CMake build directories. 2024-07-12 17:13:16 +02:00
Grégoire Roussel
9cf61d6597 [build-system] Migrate test/ directory to CMakeLists
- remove MakeFile, replaced with equivalent CMakeLists.txt
- add advanced option TRACY_DEMANGLE in client for CI testing
2024-07-03 14:05:49 +02:00
Martijn Courteaux
5d52427f4a Two minor fixes. 2024-06-07 11:36:47 +02:00
Bartosz Taudul
828e52f5c4 Merge pull request #754 from Chekov2k/python
Added basic Python Support
2024-03-23 11:57:02 +01:00
Arnim Balzer
d65d96191a Added basic Python Support
Supported:
 - FrameMarks
 - ScopedZones
 - Memory allocations
 - Plots
 - ThreadNames
 - Messages
 - AppConfig

Not supported:
 - GPU
2024-03-23 06:45:12 +00:00
Bartosz Taudul
375f4526df Set TRACY_VERSION_STRING directly in version.cmake. 2024-03-21 23:04:39 +01:00