Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf mem: Allow all record/report options

For perf mem report / perf mem record, pass all unknown options
through to the underlying report/record commands. This makes things
like

perf mem record -a sleep 1

work. Matches how c2c and other tools work.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/20180406203812.3087-2-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Andi Kleen and committed by
Arnaldo Carvalho de Melo
a7e9eab3 4e5c01a7

+5 -2
+3
tools/perf/Documentation/perf-mem.txt
··· 67 67 --phys-data:: 68 68 Record/Report sample physical addresses 69 69 70 + In addition, for report all perf report options are valid, and for record 71 + all perf record options. 72 + 70 73 SEE ALSO 71 74 -------- 72 75 linkperf:perf-record[1], linkperf:perf-report[1]
+2 -2
tools/perf/builtin-mem.c
··· 83 83 }; 84 84 85 85 argc = parse_options(argc, argv, options, record_mem_usage, 86 - PARSE_OPT_STOP_AT_NON_OPTION); 86 + PARSE_OPT_KEEP_UNKNOWN); 87 87 88 88 rec_argc = argc + 9; /* max number of arguments */ 89 89 rec_argv = calloc(rec_argc + 1, sizeof(char *)); ··· 436 436 } 437 437 438 438 argc = parse_options_subcommand(argc, argv, mem_options, mem_subcommands, 439 - mem_usage, PARSE_OPT_STOP_AT_NON_OPTION); 439 + mem_usage, PARSE_OPT_KEEP_UNKNOWN); 440 440 441 441 if (!argc || !(strncmp(argv[0], "rec", 3) || mem.operation)) 442 442 usage_with_options(mem_usage, mem_options);