perf record: Disable profiling before draining the buffer