perf trace/scripting: Add 'record' and 'report' options