There's a bunch of really good C++ profilers already. My current favourite is Tracy: https://github.com/wolfpld/tracy
Though it's true that more advanced features require OS support (eg: showing how threads get moved amongst CPU cores, and so on).
Library search path is `/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/1[4-9].[0-9].[0-9]/lib/darwin`.
Superluminal is far and away the best profiler imho.
Tracy is a great instrumented profiler. But damn do I love a good sampling profiler. Tracy can sample. But I had serious issues with it on one of my projects I could never get around.