Just in-case you didn't know about this, check out this new profiling technique and it's working implementation at; https://github.com/plasma-umass/coz/ Also a paper describing the work is available at; https://blog.acolyer.org/2015/10/14/coz-finding-code-that-counts-with-causal-profling/