Visual Studio Profiler
The profiler built into Visual Studio is a sampling profiler. When you examine a function, it can display a per line cost, although it is often off by a 1, and the real cost was in the previous line.
I find this profiler mostly useful to look for hot functions, and to get an approximate breakdown of the cost within these functions. On the other hand it has no idea about when and where context switches occurred, and so can sometimes be incorrect.
A benefit for this profiler is that is display the data directly within Visual Studio, an unfortunate thing I've noticed with some profilers is that the visualizer uses a custom code editor and it looks awful(Intel Vtune..)
This profiler is a hybrid frame/sampling profiler.
For the frame based part you need to instrument your program with scope based macros, giving each section a name. You can also instrument many other things such as threads, memory allocations, and mutex acquisition.
It uses a separate tool to visualize the data, which allows inspecting each frame individually, or to aggregate a given function, viewing statistical data about it.
One very nice feature of Tracy is the fact that it is context switch aware, although you do need to run Visual Studio in admin mode so Tracy can acquire the necessary information at runtime.
When enabled this greys out the threads that were inactive, this way what appears to be a random long running tasks, is clearly just a task that was context switched out.
One thing I didn't care for was the amount of bloat in the tracy header file, so I created by my forward declarations/macros/functions to wrap it, to avoid including so many heavy headers.