I am trying to profile my code runtime and startup time. I have used perf and uftrace so far to find runtime issues and I have detected a lot of issues at runtime but I would also like to know more about the initialization and know where I am losing the time. I have tried to use LD_DEBUG=statistics to get more info about dynamically loaded libraries but I have not noticed anything out of the ordinary, and it makes sense as I have all of the libraries statically linked with the executable.
Is it possible to measure how long it takes to initialize statics/globals and anything and everything that happens before the flow reaches main()?
