Currently, we can do sampling based profiling. But how can we do instrumentation based profiling?
In gcc, there are
-finstrument-functions options for generating a special instruction for entries of functions. And the instruction is utilized for profiling.
Also, LLVM has similar thing called to
Is there no way to generate those instructions like them in rustc?
If there is no way, I think that we must consider adding the way to rustc.