Move profiler from context into machine