You could run a browser and record all the page faults, then remove all the code you didn't run.
https://fgiesen.wordpress.com/2012/04/08/metaprogramming-for...