linux/tools/perf/scripts/perl/bin/rw-by-file-record

#!/bin/bash
perf record -e syscalls:sys_enter_read -e syscalls:sys_enter_write $@