Skip to contentSkip to conversation

perf tools: Fix incorrect --user-regs comments

PATCH Superseded Dapeng Mi 2 participants 3 messages Apr 2, 2025 – Apr 3, 2025 perf events

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Dapeng Mi

author
#0 lore raw

PATCH 1/1 perf tools: Fix incorrect --user-regs comments

The comment of "--user-regs" option is not correct, fix it.

"on interrupt," -> "on user space,"

Fixes 84c417422798 ("perf record: Support direct --user-regs arguments")
---
 tools/perf/builtin-record.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-record.c +1 -1
index ba20bf7c011d..f21b133691d7 100644
@@ -3480,7 +3480,7 @@ static struct option __record_options[] = {
 		    "sample selected machine registers on interrupt,"
 		    " use '-I?' to list register names", parse_intr_regs),
 	OPT_CALLBACK_OPTARG(0, "user-regs", &record.opts.sample_user_regs, NULL, "any register",
-		    "sample selected machine registers on interrupt,"
+		    "sample selected machine registers on user space,"
 		    " use '--user-regs=?' to list register names", parse_user_regs),
 	OPT_BOOLEAN(0, "running-time", &record.opts.running_time,
 		    "Record running/enabled time of read (:S) events"),

base-commit: 35d13f841a3d8159ef20d5e32a9ed3faa27875bc

Signature · 1 line
2.40.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Dapeng Mi

The comment of "--user-regs" option is not correct, fix it.

"on interrupt," -> "on user space,"

nit: I think "in user space" is more grammatical.

Quoted 11 lines
Fixes 84c417422798 ("perf record: Support direct --user-regs arguments")
---
 tools/perf/builtin-record.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-record.c +0 -0
index ba20bf7c011d..f21b133691d7 100644

tools/perf/builtin-record.c static struct option __record_options[] = { · line 3483

Quoted 5 lines
tools/perf/builtin-record.c +1 -1
@@ -3480,7 +3480,7 @@ static struct option __record_options[] = {
                    "sample selected machine registers on interrupt,"
                    " use '-I?' to list register names", parse_intr_regs),
        OPT_CALLBACK_OPTARG(0, "user-regs", &record.opts.sample_user_regs, NULL, "any register",
-                   "sample selected machine registers on interrupt,"
+                   "sample selected machine registers on user space,"

nit: "sample selected machine registers in user space"

Thanks,
Ian

Quoted 8 lines
tools/perf/builtin-record.c +0 -0
                    " use '--user-regs=?' to list register names", parse_user_regs),
        OPT_BOOLEAN(0, "running-time", &record.opts.running_time,
                    "Record running/enabled time of read (:S) events"),

base-commit: 35d13f841a3d8159ef20d5e32a9ed3faa27875bc --
2.40.1

author
#2 lore raw
Quoted 5 lines · Ian Rogers
Quoted 3 lines · Dapeng Mi

The comment of "--user-regs" option is not correct, fix it.

"on interrupt," -> "on user space,"

nit: I think "in user space" is more grammatical.

Sure.

Quoted 19 lines
Quoted 12 lines
Fixes 84c417422798 ("perf record: Support direct --user-regs arguments")
---
 tools/perf/builtin-record.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-record.c +0 -0
index ba20bf7c011d..f21b133691d7 100644

tools/perf/builtin-record.c static struct option __record_options[] = { · line 3483

Quoted 5 lines
tools/perf/builtin-record.c +1 -1
@@ -3480,7 +3480,7 @@ static struct option __record_options[] = {
                    "sample selected machine registers on interrupt,"
                    " use '-I?' to list register names", parse_intr_regs),
        OPT_CALLBACK_OPTARG(0, "user-regs", &record.opts.sample_user_regs, NULL, "any register",
-                   "sample selected machine registers on interrupt,"
+                   "sample selected machine registers on user space,"

nit: "sample selected machine registers in user space"

Quoted 1 line

Sure. Thanks for reviewing.

Quoted 12 lines

Thanks,
Ian

Quoted 8 lines
tools/perf/builtin-record.c +0 -0
                    " use '--user-regs=?' to list register names", parse_user_regs),
        OPT_BOOLEAN(0, "running-time", &record.opts.running_time,
                    "Record running/enabled time of read (:S) events"),

base-commit: 35d13f841a3d8159ef20d5e32a9ed3faa27875bc --
2.40.1