Skip to contentSkip to conversation

perf record: Fix suggestion to get list of registers usable with --user-regs and --intr-regs

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message May 18, 2019 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  8e5bc76f2ce39ffd48350d6dd9318d78d07b0bfa
Gitweb:     https://git.kernel.org/tip/8e5bc76f2ce39ffd48350d6dd9318d78d07b0bfa
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Mon, 13 May 2019 15:55:01 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 15 May 2019 16:36:46 -0300

perf record: Fix suggestion to get list of registers usable with --user-regs and --intr-regs

  $ perf record -h -I

Usage: perf record [<options>] [<command>]
or: perf record [<options>] -- <command> [<options>]

-I, --intr-regs[=<any register>]
sample selected machine registers on interrupt, use -I ? to list register names

  $ m
  $ perf record -I ?
  Workload failed: No such file or directory
  $

After:

  $ perf record -h -I

Usage: perf record [<options>] [<command>]
or: perf record [<options>] -- <command> [<options>]

-I, --intr-regs[=<any register>]
sample selected machine registers on interrupt, use '-I?' to list register names

$

  $ perf record -I?
  available registers: AX BX CX DX SI DI BP SP IP FLAGS CS SS R8 R9 R10 R11 R12 R13 R14 R15

Usage: perf record [<options>] [<command>]
or: perf record [<options>] -- <command> [<options>]

-I, --intr-regs[=<any register>]
sample selected machine registers on interrupt, use '-I?' to list register names
$

Cc Adrian Hunter <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc Andi Kleen <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Fixes bcc84ec65ad1 ("perf record: Add ability to name registers to record")
---
 tools/perf/builtin-record.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/builtin-record.c +2 -2
index c5e10552776a..d2b5a22b7249 100644
@@ -2017,10 +2017,10 @@ static struct option __record_options[] = {
 		    "use per-thread mmaps"),
 	OPT_CALLBACK_OPTARG('I', "intr-regs", &record.opts.sample_intr_regs, NULL, "any register",
 		    "sample selected machine registers on interrupt,"
-		    " use -I ? to list register names", parse_regs),
+		    " use '-I?' to list register names", parse_regs),
 	OPT_CALLBACK_OPTARG(0, "user-regs", &record.opts.sample_user_regs, NULL, "any register",
 		    "sample selected machine registers on interrupt,"
-		    " use -I ? to list register names", parse_regs),
+		    " use '-I?' to list register names", parse_regs),
 	OPT_BOOLEAN(0, "running-time", &record.opts.running_time,
 		    "Record running/enabled time of read (:S) events"),
 	OPT_CALLBACK('k', "clockid", &record.opts,