Add task profiler, which works by instrumenting each task runtime when enabled.