Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Call counts in Spacetime #1180
This patch provides for the counting of:
during the execution of a program running with Spacetime instrumentation. This helps, in particular, to identify indirect calls that might be able to be turned into direct calls (for example with an inlining annotation on a functor) to realise a performance gain. It should also help identify targets for the adding of inlining annotations (for example when there are many direct calls to some small function).
As when viewing allocations using Spacetime, the backtrace is available for each direct and indirect call. Two pull requests have been submitted for the viewer and associated library:
This functionality requires extra memory and a small amount of overhead over the existing Spacetime memory profiling. It also generates different code when compiling OCaml functions so must be enabled by a compiler configuration option. Profiles produced using a compiler with this patch but call counts disabled can be decoded by existing versions of the viewer. The version of the viewer supporting call counts can read profiles that were created both with and without call counts.