perf script: Also allow forcing reading of non-root owned files by root
PATCH 1/1 perf script: Also allow forcing reading of non-root owned files by root
In 2059fc7a5a9e6677, perf report was added the option of forcing reading of non-root owned symbol file.
This add the same behavior for perf script.
--- tools/perf/builtin-script.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/builtin-script.c +2 -1
@@ -2180,7 +2180,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) "Show the mmap events"),OPT_BOOLEAN ('\0' ,"show-switch-events" , &script.show_switch_events,"Show context switch events (if recorded)" ), -OPT_BOOLEAN ('f' ,"force" , &file.force,"don't complain, do it" ), +OPT_BOOLEAN ('f' ,"force" , &symbol_conf.force,"don't complain, do it" ),OPT_BOOLEAN (0 ,"ns" , &nanosecs,"Use 9 decimal places when displaying time" ), OPT_CALLBACK_OPTARG(0, "itrace", &itrace_synth_opts, NULL, "opts",
@@ -2212,6 +2212,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) PARSE_OPT_STOP_AT_NON_OPTION); file.path = input_name; + file.force = symbol_conf.force;if (argc >1 && !strncmp (argv[0 ],"rec" ,strlen ("rec" ))) { rec_script_path =get_script_path (argv[1 ],RECORD_SUFFIX );
Signature · 1 line
2.11.0
Arnaldo Carvalho de Melo
maintainerEm Fri, Jan 13, 2017 at 01:25:27PM -0500, Yannick Brosseau escreveu:
Quoted 4 lines
In
2059fc7a5a9e6677, perf report was added the option of forcing reading of non-root owned symbol file.This add the same behavior for perf script.
looks ok, applied.
- Arnaldo
Quoted 29 lines
Reported-by Mark Drayton <[email protected]>Signed-off-by Yannick Brosseau <[email protected]>--- tools/perf/builtin-script.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/perf/builtin-script.c +2
-1@@ -2180,7 +2180,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) "Show the mmap events"),OPT_BOOLEAN ('\0' ,"show-switch-events" , &script.show_switch_events,"Show context switch events (if recorded)" ), -OPT_BOOLEAN ('f' ,"force" , &file.force,"don't complain, do it" ), +OPT_BOOLEAN ('f' ,"force" , &symbol_conf.force,"don't complain, do it" ),OPT_BOOLEAN (0 ,"ns" , &nanosecs,"Use 9 decimal places when displaying time" ), OPT_CALLBACK_OPTARG(0, "itrace", &itrace_synth_opts, NULL, "opts",@@ -2212,6 +2212,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) PARSE_OPT_STOP_AT_NON_OPTION); file.path = input_name; + file.force = symbol_conf.force;if (argc >1 && !strncmp (argv[0 ],"rec" ,strlen ("rec" ))) { rec_script_path =get_script_path (argv[1 ],RECORD_SUFFIX );Signature · 1 line
2.11.0
tip-bot for Yannick Brosseau
merge botperf script: Also allow forcing reading of non-root owned files by root
Commit-ID: be3d466c7356e574a2aa4e19dd20b19b3a9cc4fc Gitweb: http://git.kernel.org/tip/be3d466c7356e574a2aa4e19dd20b19b3a9cc4fc Author: Yannick Brosseau <[email protected]> AuthorDate: Fri, 13 Jan 2017 13:25:27 -0500 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Mon, 16 Jan 2017 14:59:15 -0300
perf script: Also allow forcing reading of non-root owned files by root
In 2059fc7a5a9e ("perf symbols: Allow forcing reading of non-root owned files by root") 'perf report' was added the option of forcing reading of non-root owned symbol file.
This add the same behavior for perf script.
--- tools/perf/builtin-script.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/builtin-script.c +2 -1
@@ -2180,7 +2180,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) "Show the mmap events"),OPT_BOOLEAN ('\0' ,"show-switch-events" , &script.show_switch_events,"Show context switch events (if recorded)" ), -OPT_BOOLEAN ('f' ,"force" , &file.force,"don't complain, do it" ), +OPT_BOOLEAN ('f' ,"force" , &symbol_conf.force,"don't complain, do it" ),OPT_BOOLEAN (0 ,"ns" , &nanosecs,"Use 9 decimal places when displaying time" ), OPT_CALLBACK_OPTARG(0, "itrace", &itrace_synth_opts, NULL, "opts",
@@ -2212,6 +2212,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) PARSE_OPT_STOP_AT_NON_OPTION); file.path = input_name; + file.force = symbol_conf.force;if (argc >1 && !strncmp (argv[0 ],"rec" ,strlen ("rec" ))) { rec_script_path =get_script_path (argv[1 ],RECORD_SUFFIX );