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

perf tools: Report itrace options in help

I often forget all the options that --itrace accepts. Instead of burying
them in the man page only report them in the normal command line help
too to make them easier accessible.

v2: Align

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kim Phillips <kim.phillips@arm.com>
Link: http://lkml.kernel.org/r/20180914031038.4160-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
c12e039d 3b9c25c0

+23 -3
+2 -1
tools/perf/builtin-inject.c
··· 798 798 "kallsyms pathname"), 799 799 OPT_BOOLEAN('f', "force", &data.force, "don't complain, do it"), 800 800 OPT_CALLBACK_OPTARG(0, "itrace", &inject.itrace_synth_opts, 801 - NULL, "opts", "Instruction Tracing options", 801 + NULL, "opts", "Instruction Tracing options\n" 802 + ITRACE_HELP, 802 803 itrace_parse_synth_opts), 803 804 OPT_BOOLEAN(0, "strip", &inject.strip, 804 805 "strip non-synthesized events (use with --itrace)"),
+1 -1
tools/perf/builtin-report.c
··· 1104 1104 OPT_CALLBACK(0, "percentage", NULL, "relative|absolute", 1105 1105 "how to display percentage of filtered entries", parse_filter_percentage), 1106 1106 OPT_CALLBACK_OPTARG(0, "itrace", &itrace_synth_opts, NULL, "opts", 1107 - "Instruction Tracing options", 1107 + "Instruction Tracing options\n" ITRACE_HELP, 1108 1108 itrace_parse_synth_opts), 1109 1109 OPT_BOOLEAN(0, "full-source-path", &srcline_full_filename, 1110 1110 "Show full source file name path for source lines"),
+1 -1
tools/perf/builtin-script.c
··· 3193 3193 OPT_BOOLEAN(0, "ns", &nanosecs, 3194 3194 "Use 9 decimal places when displaying time"), 3195 3195 OPT_CALLBACK_OPTARG(0, "itrace", &itrace_synth_opts, NULL, "opts", 3196 - "Instruction Tracing options", 3196 + "Instruction Tracing options\n" ITRACE_HELP, 3197 3197 itrace_parse_synth_opts), 3198 3198 OPT_BOOLEAN(0, "full-source-path", &srcline_full_filename, 3199 3199 "Show full source file name path for source lines"),
+19
tools/perf/util/auxtrace.h
··· 576 576 return session->auxtrace->free(session); 577 577 } 578 578 579 + #define ITRACE_HELP \ 580 + " i: synthesize instructions events\n" \ 581 + " b: synthesize branches events\n" \ 582 + " c: synthesize branches events (calls only)\n" \ 583 + " r: synthesize branches events (returns only)\n" \ 584 + " x: synthesize transactions events\n" \ 585 + " w: synthesize ptwrite events\n" \ 586 + " p: synthesize power events\n" \ 587 + " e: synthesize error events\n" \ 588 + " d: create a debug log\n" \ 589 + " g[len]: synthesize a call chain (use with i or x)\n" \ 590 + " l[len]: synthesize last branch entries (use with i or x)\n" \ 591 + " sNUMBER: skip initial number of events\n" \ 592 + " PERIOD[ns|us|ms|i|t]: specify period to sample stream\n" \ 593 + " concatenate multiple options. Default is ibxwpe or cewp\n" 594 + 595 + 579 596 #else 580 597 581 598 static inline struct auxtrace_record * ··· 732 715 void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp, 733 716 struct perf_evlist *evlist, int idx, 734 717 bool per_cpu); 718 + 719 + #define ITRACE_HELP "" 735 720 736 721 #endif 737 722