api: add flag to enable cpu profiling