perf docs: Add perf-iostat link to manpages
PATCH 1/2 perf docs: Add perf-iostat link to manpages
--- tools/perf/Documentation/perf.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Documentation/perf.txt +1 -1
@@ -83,7 +83,7 @@ linkperf:perf-buildid-list[1], linkperf:perf-c2c[1], linkperf:perf-config[1], linkperf:perf-data[1], linkperf:perf-diff[1], linkperf:perf-evlist[1], linkperf:perf-ftrace[1], linkperf:perf-help[1], linkperf:perf-inject[1], -linkperf:perf-intel-pt[1], linkperf:perf-kallsyms[1], +linkperf:perf-intel-pt[1], linkperf:perf-iostat[1], linkperf:perf-kallsyms[1], linkperf:perf-kmem[1], linkperf:perf-kvm[1], linkperf:perf-lock[1], linkperf:perf-mem[1], linkperf:perf-probe[1], linkperf:perf-sched[1], linkperf:perf-script[1], linkperf:perf-test[1],
Signature · 1 line
2.18.4
PATCH 2/2 perf: Add external commands to list-cmds
The perf --list-cmds output prints only internal commands, although there is no reason for that from users' perspective.
Adding the external commands to commands array with NULL function pointer allows printing all perf commands while not changing the logic of command handler selection.
--- tools/perf/perf.c | 4 ++++ 1 file changed, 4 insertions(+)
tools/perf/perf.c +4 -0
@@ -55,6 +55,7 @@ struct cmd_struct { };static struct cmd_struct commands[] = { + {"archive" ,NULL ,0 }, {"buildid-cache" , cmd_buildid_cache,0 }, {"buildid-list" , cmd_buildid_list,0 }, {"config" , cmd_config,0 },
@@ -62,6 +63,7 @@ static struct cmd_struct commands[] = { { "diff", cmd_diff, 0 }, { "evlist", cmd_evlist, 0 }, { "help", cmd_help, 0 }, + { "iostat", NULL, 0 }, { "kallsyms", cmd_kallsyms, 0 }, { "list", cmd_list, 0 }, { "record", cmd_record, 0 },
@@ -360,6 +362,8 @@ static void handle_internal_command(int argc, const char **argv)for (i =0 ; i <ARRAY_SIZE (commands); i++) {struct cmd_struct *p = commands+i; +if (p->fn ==NULL ) +continue ;if (strcmp (p->cmd, cmd))continue ;exit (run_builtin (p, argc, argv));
Signature · 1 line
2.18.4
Re: [PATCH 2/2] perf: Add external commands to list-cmds
Quoted 9 lines · Michael Petlan
The
perf --list-cmdsoutput prints only internal commands, although there is no reason for that from users' perspective.Adding the external commands to commands array with NULL function pointer allows printing all perf commands while not changing the logic of command handler selection.
Signed-off-by Michael Petlan <[email protected]>
Thanks,
Ian
Quoted 36 lines
--- tools/perf/perf.c | 4 ++++ 1 file changed, 4 insertions(+)tools/perf/perf.c +4
-1@@ -55,6 +55,7 @@ struct cmd_struct { };static struct cmd_struct commands[] = { + {"archive" ,NULL ,0 }, {"buildid-cache" , cmd_buildid_cache,0 }, {"buildid-list" , cmd_buildid_list,0 }, {"config" , cmd_config,0 },@@ -62,6 +63,7 @@ static struct cmd_struct commands[] = { { "diff", cmd_diff, 0 }, { "evlist", cmd_evlist, 0 }, { "help", cmd_help, 0 }, + { "iostat", NULL, 0 }, { "kallsyms", cmd_kallsyms, 0 }, { "list", cmd_list, 0 }, { "record", cmd_record, 0 },@@ -360,6 +362,8 @@ static void handle_internal_command(int argc, const char **argv)for (i =0 ; i <ARRAY_SIZE (commands); i++) {struct cmd_struct *p = commands+i; +if (p->fn ==NULL ) +continue ;if (strcmp (p->cmd, cmd))continue ;exit (run_builtin (p, argc, argv)); --2.18.4
Re: [PATCH 2/2] perf: Add external commands to list-cmds
Em Tue, Apr 05, 2022 at 01:54:21PM -0700, Ian Rogers escreveu:
Quoted 5 lines · Michael Petlan
Quoted 4 lines
The
perf --list-cmdsoutput prints only internal commands, although there is no reason for that from users' perspective.
Quoted 7 lines
Quoted 5 lines
Adding the external commands to commands array with NULL function pointer allows printing all perf commands while not changing the logic of command handler selection.
Signed-off-by Michael Petlan <[email protected]>Acked-by Ian Rogers <[email protected]>
Thanks, applied.
- Arnaldo
Quoted 39 lines
Thanks,
IanQuoted 36 lines
--- tools/perf/perf.c | 4 ++++ 1 file changed, 4 insertions(+)tools/perf/perf.c +4
-1@@ -55,6 +55,7 @@ struct cmd_struct { };static struct cmd_struct commands[] = { + {"archive" ,NULL ,0 }, {"buildid-cache" , cmd_buildid_cache,0 }, {"buildid-list" , cmd_buildid_list,0 }, {"config" , cmd_config,0 },@@ -62,6 +63,7 @@ static struct cmd_struct commands[] = { { "diff", cmd_diff, 0 }, { "evlist", cmd_evlist, 0 }, { "help", cmd_help, 0 }, + { "iostat", NULL, 0 }, { "kallsyms", cmd_kallsyms, 0 }, { "list", cmd_list, 0 }, { "record", cmd_record, 0 },@@ -360,6 +362,8 @@ static void handle_internal_command(int argc, const char **argv)for (i =0 ; i <ARRAY_SIZE (commands); i++) {struct cmd_struct *p = commands+i; +if (p->fn ==NULL ) +continue ;if (strcmp (p->cmd, cmd))continue ;exit (run_builtin (p, argc, argv)); --2.18.4
Signature · 1 line
- Arnaldo
Quoted 2 lines · Michael Petlan
Signed-off-by Michael Petlan <[email protected]>
Thanks,
Ian
Quoted 20 lines
--- tools/perf/Documentation/perf.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/Documentation/perf.txt +1
-2@@ -83,7 +83,7 @@ linkperf:perf-buildid-list[1], linkperf:perf-c2c[1], linkperf:perf-config[1], linkperf:perf-data[1], linkperf:perf-diff[1], linkperf:perf-evlist[1], linkperf:perf-ftrace[1], linkperf:perf-help[1], linkperf:perf-inject[1], -linkperf:perf-intel-pt[1], linkperf:perf-kallsyms[1], +linkperf:perf-intel-pt[1], linkperf:perf-iostat[1], linkperf:perf-kallsyms[1], linkperf:perf-kmem[1], linkperf:perf-kvm[1], linkperf:perf-lock[1], linkperf:perf-mem[1], linkperf:perf-probe[1], linkperf:perf-sched[1], linkperf:perf-script[1], linkperf:perf-test[1], --2.18.4
Em Tue, Apr 05, 2022 at 01:53:59PM -0700, Ian Rogers escreveu:
Quoted 5 lines · Michael Petlan
Quoted 2 lines
Signed-off-by Michael Petlan <[email protected]>Acked-by Ian Rogers <[email protected]>
Thanks, applied.
- Arnaldo
Quoted 23 lines
Thanks,
IanQuoted 20 lines
--- tools/perf/Documentation/perf.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/Documentation/perf.txt +1
-2@@ -83,7 +83,7 @@ linkperf:perf-buildid-list[1], linkperf:perf-c2c[1], linkperf:perf-config[1], linkperf:perf-data[1], linkperf:perf-diff[1], linkperf:perf-evlist[1], linkperf:perf-ftrace[1], linkperf:perf-help[1], linkperf:perf-inject[1], -linkperf:perf-intel-pt[1], linkperf:perf-kallsyms[1], +linkperf:perf-intel-pt[1], linkperf:perf-iostat[1], linkperf:perf-kallsyms[1], linkperf:perf-kmem[1], linkperf:perf-kvm[1], linkperf:perf-lock[1], linkperf:perf-mem[1], linkperf:perf-probe[1], linkperf:perf-sched[1], linkperf:perf-script[1], linkperf:perf-test[1], --2.18.4
Signature · 1 line
- Arnaldo