Overview
Tracy is a high performance sampling profiler. Here's a short note on how to build the profiler server on macOS:
Build
$ brew install freetype capstone gtk
$ git clone https://github.com/wolfpld/tracy.git
$ cd tracy/profiler/build
$ make release
Run
We can now run the server and UI:
$ ./Tracy-release
Hit the Connect
button and then start your Tracy-updated application.
To actually profile an application, you have to integrate a couple of source files and demark frames and zones using macros.
This is not too hard, and is best explained by the instructions in tracy.pdf
, found at https://github.com/wolfpld/tracy/releases
The short version is, add Tracy.hpp, TracyClient.cpp to your makefiles, then include Tracy.hpp in every source file you want to profile. Then use macros such as ZoneScoped.
If using cmake, the easiest approach is to add tracy as a submodule, add the Tracy.hpp/TracyClient.cpp files and make sure include dir and TRACY_ENABLE is set:
add_compile_definitions(TRACY_ENABLE)
include_directories("tracy")
Discussion (0)