linux/tools/perf/scripts/python/bin/task-analyzer-record

#!/bin/bash
perf record -e sched:sched_switch -e sched:sched_migrate_task "$@"