Tracy is a high performance sampling profiler. Here's a short note on how to build the profiler server on macOS:
$ brew install freetype capstone gtk $ git clone https://github.com/wolfpld/tracy.git $ cd tracy/profiler/build $ make release
We can now run the server and UI:
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: