Metaprogramatically add profiler hooks