I have installed NSight, but it seems geared towards GPU, CUDA etc and I can’t see the options for just normal CPU sampling and ranking the C/C++ function calls etc.
I am interested in seeing what my C/C++ code is doing, with the usual breakdowns/call graphs etc that I am used to from MSVC and Xcode desktop development.
Googling just reveals a myriad of different options stretching back to the early 2000s, I wonder what is the main thing people use in 2024?
In the end I used gprofng to give me what I wanted.
This is part of binutils and as the profiler is quite a recent tool it wasn’t available in Ubuntu 20.04 so I had to manually build it. I think it should be already available or installable for Ubuntu 22.04.
I found the html output option wasn’t supported for arm64 for some reason, but I was able to view the results using the project below:
This was better than the somewhat tedious command-line output options, but I guess if you’re a command-line guru that might float your boat!