From 06af0f2c919d7c8f05efebe0d96a6f22297aafd4 Mon Sep 17 00:00:00 2001 From: Yunlong Song Date: Thu, 2 Apr 2015 21:47:16 +0800 Subject: perf script: Support using -f to override perf.data file ownership Enable perf script to use perf.data when it is not owned by current user or root. Change the short option name of --fields to -F to avoid confusion with --force. Example: # perf record ls # chown Yunlong.Song:Yunlong.Song perf.data # ls -al perf.data -rw------- 1 Yunlong.Song Yunlong.Song 28360 Apr 2 14:53 perf.data # id uid=0(root) gid=0(root) groups=0(root),64(pkcs11) Before this patch: # perf script File perf.data not owned by current user or root (use -f to override) # perf script -f Error: switch `f' requires a value usage: perf script [] or: perf script [] record