Commit Graph

58 Commits

Author SHA1 Message Date
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
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
0269a196a4 Add TracyTaggedUserlandAddress.hpp to include list in meson. 2026-04-11 13:16:47 +02:00
Bartosz Taudul
44b1de2d71 Target win10 with mingw. 2026-04-03 02:11:16 +02:00
Clément Grégoire
e9073800d5 Remove extraneous newline in meson.build 2026-02-09 11:41:11 +01:00
Clément Grégoire
b27561c21e Add TRACY_DISALLOW_HW_TIMER for VMs / WSL2 2026-02-08 17:10:24 +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
Bartosz Taudul
05cceee0df Release 0.13.1. 2025-12-11 23:46:02 +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
Bartosz Taudul
e6b9ea4609 Release 0.13.0. 2025-11-11 16:31:54 +01:00
Bartosz Taudul
9a27779d56 TRACY_CALLSTACK is not boolean. 2025-11-03 16:31:16 +01:00
Bartosz Taudul
d413e2bb51 Merge pull request #1186 from KovalevDima/denerate-pc-for-tracy
Generate pkgconf file for tracy downstream users
2025-11-02 18:43:00 +01:00
KovalevDima
da5547691a Generate pkgconf file for tracy 2025-11-02 20:08:03 +03:00
Patrik Kraif
4a3713cca8 Add support for GDK 2025-07-16 12:51:16 +02:00
Bartosz Taudul
c556831ddc Release 0.12.2. 2025-06-25 23:55:40 +02:00
Bartosz Taudul
650c98ece7 Relase 0.12.1. 2025-06-07 16:59:25 +02:00
Bartosz Taudul
3100c39a68 Remove ObjC header from Meson build.
Meson decides to be special again:

"ERROR: No specified compiler can handle file public/tracy/TracyMetal.hmm"
2025-06-07 13:45:17 +02:00
Bartosz Taudul
0dd5c8b507 Add TracyCUDA.hpp and TracyMetal.hmm to meson include list. 2025-06-07 13:35:57 +02:00
Bartosz Taudul
87924acdd9 Release 0.12.0. 2025-05-30 20:27:13 +02:00
Marco Treglia
2d53818e55 Changed mesong.build 2025-02-19 09:36:55 +01:00
Marco Treglia
d966ecf9f7 add TracyKCore in meson.build 2025-02-19 09:36:50 +01:00
Jonathan Guzmán
b48ab72cf0 detect MSVC usage
previous check tested for compiler ID, fixed the detection to an specific MSVC macro and the current C++ version so it does not override an user specified version
2024-12-12 12:37:53 -06: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
Bartosz Taudul
075395620a Release 0.11.0. 2024-07-16 18:38:15 +02:00
Elliot
a26f076a0e fix build warnings when compiling with clang-cl 2024-03-11 14:44:44 -04:00
Bartosz Taudul
7f04c66ef1 Bump meson version requirement to 1.1. 2024-02-11 17:32:42 +01:00
Bartosz Taudul
8731f3bc73 Drop shared_libs meson option. 2024-02-11 17:26:48 +01:00
Bartosz Taudul
783bc7c939 Drop tracy_ prefix from meson options. 2024-02-11 17:20:43 +01:00
Bartosz Taudul
d46ffb4e9f Add verbose and debuginfod to meson options. 2024-02-05 02:12:31 +01:00
Bartosz Taudul
e7b9bffbbd Rename TRACE_CLIENT_LIBUNWIND_BACKTRACE to TRACY_LIBUNWIND_BACKTRACE. 2023-12-21 14:07:44 +01:00
Ivan Molodetskikh
4e23b1125a meson: Add tracy_libbacktrace_elf_dynload_support option 2023-12-12 08:06:31 +04:00
Ivan Molodetskikh
b110b10b35 meson: Add tracy_symbol_offline_resolve option 2023-12-12 08:06:08 +04:00
Ivan Molodetskikh
2b0be68b4a meson: Add libunwind option
The CMake name was a bit weird, so I changed it to the standard format
for meson.
2023-12-12 08:05:38 +04:00
Ivan Molodetskikh
c0e4652edf meson: Add tracy_public_deps list
Currently functionally identical to before. Will be used in a subsequent
commit for libunwind, which appears in a public header.
2023-12-12 08:04:41 +04:00
Elliot
67b454286f fix deprecation tag in option and reverse warning check 2023-11-15 13:02:05 -05:00
Elliot
a3774039f6 warn when tracy_shared_libs and default_library mismatch 2023-11-13 15:56:17 -05:00
Elliot
b95fb270cb Update meson.build
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2023-11-11 23:17:20 -05:00
Elliot
96411e5d10 specify more accurate min version 2023-11-09 13:56:21 -05:00
Elliot
46ba3bf1c9 use mesons default_library flag 2023-11-09 13:50:34 -05:00
Ivan Molodetskikh
c2fb6f62fb meson: Add missing TracySysPower include 2023-10-24 08:27:12 +04:00
Ivan Molodetskikh
7a2ce93998 meson: Generate pkgconfig file
Lets multiple projects use the same Tracy library.
2023-10-19 13:31:39 +04:00
Ivan Molodetskikh
170a07c46b meson: Fix header install dir 2023-10-19 13:28:29 +04:00
Ivan Molodetskikh
e93cf6d08a meson: Propagate defines to dependents
This way they don't have to set them manually.
2023-10-19 13:26:32 +04:00
Ivan Molodetskikh
6796c6fd91 meson: Remove tracy_dep_dynamic
Seems unused.
2023-10-19 13:26:32 +04:00
Ivan Molodetskikh
8ae29c0329 meson: Remove duplicate include 2023-10-19 13:26:32 +04:00
Rosen Penev
470b0934a6 fix compilation for Ubuntu MinGW
version had to be set to 7 minimum.
2023-10-16 19:41:20 -07:00
Bartosz Taudul
37aff70dfa Release 0.10.0. 2023-10-16 20:59:38 +02:00
Ivan Molodetskikh
91671ab21a Fix meson nopsleds option
It was missing from meson_options.txt breaking the build, and had an
outdated name.
2023-10-06 10:56:35 +04:00
Keno Fischer
5417227e83 Use patchable rdtsc sequence to avoid slowdowns under rr
We (Julia) ship both support for using tracy to trace julia applications,
as well as using `rr` (https://github.com/rr-debugger/rr) for record-replay debugging.
After our most recent rebuild of tracy, users have been reporting signfificant performance
slowdowns when `rr` recording a session that happens to also load the tracy library
(even if tracing is not enabled). Upon further examination, the recompile happened
to trigger a protective heuristic that disabled rr's patching of tracy's use of
`rdtsc` because an earlier part of the same function happened to look like a
conditional branch into the patch region. See https://github.com/rr-debugger/rr/pull/3580
for details. To avoid this issue occurring again in future rebuilds of tracy,
adjust tracy's `rdtsc` sequence to be `nopl; rdtsc`, which (as of of the
linked PR) is a sequence that is guaranteed to bypass this heuristic
and not incur the additional overhead when run under rr.

This functionality is kept behind a compile-time flag `TRACY_PATCHABLE_NOPSLEDS`
in order to avoid polluting the instruction cache unnecessarily.
2023-09-20 20:21:40 -04:00
Kirk Klobe
0e11b40bb2 add version to meson.build 'project()'
Meson projects which use tracy as a subproject and specify a version for the dependency will fail due to an undefined version number.
2023-03-22 21:06:03 -05:00