Hi, after almost finishing the basic functionality of my 3D Game Engine, I am now starting to expand it. The first thing that I want to work on is to improve the in-engine profiler. Currently, I have quite a bit of functionality for manually marking beginning and end parts of code that should be profiled, which has been of great help.
However, I would like to have a way through which all the functions in my code (or at least most of them) would be automatically marked for compiling. Engines like Unity and Unreal seem to achieve that somehow: you can choose to see very detailed profilling of most inner functions, even if source code of the engines does not appear to include a time-stamp recorder at the beginning and end of all the functions.
I am trying to learn how to achieve the same, but it has been very hard to find references on such type of profiling. Could any of you give me some insights on how such a thing could be achieved, which techniques could be involved, etc? I would like to state from the start that I am very aware of external good profilers that could do this for my engine - I am specifically trying to learn how to implement such a thing in-engine.