diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-03-27 10:47:20 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-03-27 10:58:09 -0400 |
commit | b0ad8ea66445d64a469df0c710947f4cdb8ef16b (patch) | |
tree | b9d137508c516b45b8a0618a9bf34617291c1d10 | |
parent | 6963d3c387ec123753788838785e68928cb87c1b (diff) |
perf tools: Remove unused 'prefix' from builtin functions
We got it from the git sources but never used it for anything, with the
place where this would be somehow used remaining:
static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
{
prefix = NULL;
if (p->option & RUN_SETUP)
prefix = NULL; /* setup_perf_directory(); */
Ditch it.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-uw5swz05vol0qpr32c5lpvus@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
41 files changed, 110 insertions, 126 deletions
diff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h index 579a592990dd..842ab2781cdc 100644 --- a/tools/perf/bench/bench.h +++ b/tools/perf/bench/bench.h | |||
@@ -25,17 +25,17 @@ | |||
25 | # endif | 25 | # endif |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | int bench_numa(int argc, const char **argv, const char *prefix); | 28 | int bench_numa(int argc, const char **argv); |
29 | int bench_sched_messaging(int argc, const char **argv, const char *prefix); | 29 | int bench_sched_messaging(int argc, const char **argv); |
30 | int bench_sched_pipe(int argc, const char **argv, const char *prefix); | 30 | int bench_sched_pipe(int argc, const char **argv); |
31 | int bench_mem_memcpy(int argc, const char **argv, const char *prefix); | 31 | int bench_mem_memcpy(int argc, const char **argv); |
32 | int bench_mem_memset(int argc, const char **argv, const char *prefix); | 32 | int bench_mem_memset(int argc, const char **argv); |
33 | int bench_futex_hash(int argc, const char **argv, const char *prefix); | 33 | int bench_futex_hash(int argc, const char **argv); |
34 | int bench_futex_wake(int argc, const char **argv, const char *prefix); | 34 | int bench_futex_wake(int argc, const char **argv); |
35 | int bench_futex_wake_parallel(int argc, const char **argv, const char *prefix); | 35 | int bench_futex_wake_parallel(int argc, const char **argv); |
36 | int bench_futex_requeue(int argc, const char **argv, const char *prefix); | 36 | int bench_futex_requeue(int argc, const char **argv); |
37 | /* pi futexes */ | 37 | /* pi futexes */ |
38 | int bench_futex_lock_pi(int argc, const char **argv, const char *prefix); | 38 | int bench_futex_lock_pi(int argc, const char **argv); |
39 | 39 | ||
40 | #define BENCH_FORMAT_DEFAULT_STR "default" | 40 | #define BENCH_FORMAT_DEFAULT_STR "default" |
41 | #define BENCH_FORMAT_DEFAULT 0 | 41 | #define BENCH_FORMAT_DEFAULT 0 |
diff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c index 2499e1b0c6fb..fe16b310097f 100644 --- a/tools/perf/bench/futex-hash.c +++ b/tools/perf/bench/futex-hash.c | |||
@@ -114,8 +114,7 @@ static void print_summary(void) | |||
114 | (int) runtime.tv_sec); | 114 | (int) runtime.tv_sec); |
115 | } | 115 | } |
116 | 116 | ||
117 | int bench_futex_hash(int argc, const char **argv, | 117 | int bench_futex_hash(int argc, const char **argv) |
118 | const char *prefix __maybe_unused) | ||
119 | { | 118 | { |
120 | int ret = 0; | 119 | int ret = 0; |
121 | cpu_set_t cpu; | 120 | cpu_set_t cpu; |
diff --git a/tools/perf/bench/futex-lock-pi.c b/tools/perf/bench/futex-lock-pi.c index a20814d94af1..73a1c44ea63c 100644 --- a/tools/perf/bench/futex-lock-pi.c +++ b/tools/perf/bench/futex-lock-pi.c | |||
@@ -140,8 +140,7 @@ static void create_threads(struct worker *w, pthread_attr_t thread_attr) | |||
140 | } | 140 | } |
141 | } | 141 | } |
142 | 142 | ||
143 | int bench_futex_lock_pi(int argc, const char **argv, | 143 | int bench_futex_lock_pi(int argc, const char **argv) |
144 | const char *prefix __maybe_unused) | ||
145 | { | 144 | { |
146 | int ret = 0; | 145 | int ret = 0; |
147 | unsigned int i; | 146 | unsigned int i; |
diff --git a/tools/perf/bench/futex-requeue.c b/tools/perf/bench/futex-requeue.c index 9fad1e4fcd3e..41786cbea24c 100644 --- a/tools/perf/bench/futex-requeue.c +++ b/tools/perf/bench/futex-requeue.c | |||
@@ -109,8 +109,7 @@ static void toggle_done(int sig __maybe_unused, | |||
109 | done = true; | 109 | done = true; |
110 | } | 110 | } |
111 | 111 | ||
112 | int bench_futex_requeue(int argc, const char **argv, | 112 | int bench_futex_requeue(int argc, const char **argv) |
113 | const char *prefix __maybe_unused) | ||
114 | { | 113 | { |
115 | int ret = 0; | 114 | int ret = 0; |
116 | unsigned int i, j; | 115 | unsigned int i, j; |
diff --git a/tools/perf/bench/futex-wake-parallel.c b/tools/perf/bench/futex-wake-parallel.c index 40f5fcf1d120..4ab12c8e016a 100644 --- a/tools/perf/bench/futex-wake-parallel.c +++ b/tools/perf/bench/futex-wake-parallel.c | |||
@@ -197,8 +197,7 @@ static void toggle_done(int sig __maybe_unused, | |||
197 | done = true; | 197 | done = true; |
198 | } | 198 | } |
199 | 199 | ||
200 | int bench_futex_wake_parallel(int argc, const char **argv, | 200 | int bench_futex_wake_parallel(int argc, const char **argv) |
201 | const char *prefix __maybe_unused) | ||
202 | { | 201 | { |
203 | int ret = 0; | 202 | int ret = 0; |
204 | unsigned int i, j; | 203 | unsigned int i, j; |
diff --git a/tools/perf/bench/futex-wake.c b/tools/perf/bench/futex-wake.c index 789490281ae3..2fa49222ef8d 100644 --- a/tools/perf/bench/futex-wake.c +++ b/tools/perf/bench/futex-wake.c | |||
@@ -115,8 +115,7 @@ static void toggle_done(int sig __maybe_unused, | |||
115 | done = true; | 115 | done = true; |
116 | } | 116 | } |
117 | 117 | ||
118 | int bench_futex_wake(int argc, const char **argv, | 118 | int bench_futex_wake(int argc, const char **argv) |
119 | const char *prefix __maybe_unused) | ||
120 | { | 119 | { |
121 | int ret = 0; | 120 | int ret = 0; |
122 | unsigned int i, j; | 121 | unsigned int i, j; |
diff --git a/tools/perf/bench/mem-functions.c b/tools/perf/bench/mem-functions.c index 52504a83b5a1..d1dea33dcfcf 100644 --- a/tools/perf/bench/mem-functions.c +++ b/tools/perf/bench/mem-functions.c | |||
@@ -284,7 +284,7 @@ static const char * const bench_mem_memcpy_usage[] = { | |||
284 | NULL | 284 | NULL |
285 | }; | 285 | }; |
286 | 286 | ||
287 | int bench_mem_memcpy(int argc, const char **argv, const char *prefix __maybe_unused) | 287 | int bench_mem_memcpy(int argc, const char **argv) |
288 | { | 288 | { |
289 | struct bench_mem_info info = { | 289 | struct bench_mem_info info = { |
290 | .functions = memcpy_functions, | 290 | .functions = memcpy_functions, |
@@ -358,7 +358,7 @@ static const struct function memset_functions[] = { | |||
358 | { .name = NULL, } | 358 | { .name = NULL, } |
359 | }; | 359 | }; |
360 | 360 | ||
361 | int bench_mem_memset(int argc, const char **argv, const char *prefix __maybe_unused) | 361 | int bench_mem_memset(int argc, const char **argv) |
362 | { | 362 | { |
363 | struct bench_mem_info info = { | 363 | struct bench_mem_info info = { |
364 | .functions = memset_functions, | 364 | .functions = memset_functions, |
diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c index 6bd0581de298..1fe43bd5a012 100644 --- a/tools/perf/bench/numa.c +++ b/tools/perf/bench/numa.c | |||
@@ -1767,7 +1767,7 @@ static int bench_all(void) | |||
1767 | return 0; | 1767 | return 0; |
1768 | } | 1768 | } |
1769 | 1769 | ||
1770 | int bench_numa(int argc, const char **argv, const char *prefix __maybe_unused) | 1770 | int bench_numa(int argc, const char **argv) |
1771 | { | 1771 | { |
1772 | init_params(&p0, "main,", argc, argv); | 1772 | init_params(&p0, "main,", argc, argv); |
1773 | argc = parse_options(argc, argv, options, bench_numa_usage, 0); | 1773 | argc = parse_options(argc, argv, options, bench_numa_usage, 0); |
diff --git a/tools/perf/bench/sched-messaging.c b/tools/perf/bench/sched-messaging.c index 6a111e775210..4f961e74535b 100644 --- a/tools/perf/bench/sched-messaging.c +++ b/tools/perf/bench/sched-messaging.c | |||
@@ -260,8 +260,7 @@ static const char * const bench_sched_message_usage[] = { | |||
260 | NULL | 260 | NULL |
261 | }; | 261 | }; |
262 | 262 | ||
263 | int bench_sched_messaging(int argc, const char **argv, | 263 | int bench_sched_messaging(int argc, const char **argv) |
264 | const char *prefix __maybe_unused) | ||
265 | { | 264 | { |
266 | unsigned int i, total_children; | 265 | unsigned int i, total_children; |
267 | struct timeval start, stop, diff; | 266 | struct timeval start, stop, diff; |
diff --git a/tools/perf/bench/sched-pipe.c b/tools/perf/bench/sched-pipe.c index 2243f0150d76..a152737370c5 100644 --- a/tools/perf/bench/sched-pipe.c +++ b/tools/perf/bench/sched-pipe.c | |||
@@ -76,7 +76,7 @@ static void *worker_thread(void *__tdata) | |||
76 | return NULL; | 76 | return NULL; |
77 | } | 77 | } |
78 | 78 | ||
79 | int bench_sched_pipe(int argc, const char **argv, const char *prefix __maybe_unused) | 79 | int bench_sched_pipe(int argc, const char **argv) |
80 | { | 80 | { |
81 | struct thread_data threads[2], *td; | 81 | struct thread_data threads[2], *td; |
82 | int pipe_1[2], pipe_2[2]; | 82 | int pipe_1[2], pipe_2[2]; |
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index e54b1f9fe1ee..56a7c8d210b9 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
@@ -383,7 +383,7 @@ static const char * const annotate_usage[] = { | |||
383 | NULL | 383 | NULL |
384 | }; | 384 | }; |
385 | 385 | ||
386 | int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused) | 386 | int cmd_annotate(int argc, const char **argv) |
387 | { | 387 | { |
388 | struct perf_annotate annotate = { | 388 | struct perf_annotate annotate = { |
389 | .tool = { | 389 | .tool = { |
diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c index a1cddc6bbf0f..445e62881254 100644 --- a/tools/perf/builtin-bench.c +++ b/tools/perf/builtin-bench.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <string.h> | 25 | #include <string.h> |
26 | #include <sys/prctl.h> | 26 | #include <sys/prctl.h> |
27 | 27 | ||
28 | typedef int (*bench_fn_t)(int argc, const char **argv, const char *prefix); | 28 | typedef int (*bench_fn_t)(int argc, const char **argv); |
29 | 29 | ||
30 | struct bench { | 30 | struct bench { |
31 | const char *name; | 31 | const char *name; |
@@ -155,7 +155,7 @@ static int bench_str2int(const char *str) | |||
155 | * to something meaningful: | 155 | * to something meaningful: |
156 | */ | 156 | */ |
157 | static int run_bench(const char *coll_name, const char *bench_name, bench_fn_t fn, | 157 | static int run_bench(const char *coll_name, const char *bench_name, bench_fn_t fn, |
158 | int argc, const char **argv, const char *prefix) | 158 | int argc, const char **argv) |
159 | { | 159 | { |
160 | int size; | 160 | int size; |
161 | char *name; | 161 | char *name; |
@@ -171,7 +171,7 @@ static int run_bench(const char *coll_name, const char *bench_name, bench_fn_t f | |||
171 | prctl(PR_SET_NAME, name); | 171 | prctl(PR_SET_NAME, name); |
172 | argv[0] = name; | 172 | argv[0] = name; |
173 | 173 | ||
174 | ret = fn(argc, argv, prefix); | 174 | ret = fn(argc, argv); |
175 | 175 | ||
176 | free(name); | 176 | free(name); |
177 | 177 | ||
@@ -198,7 +198,7 @@ static void run_collection(struct collection *coll) | |||
198 | fflush(stdout); | 198 | fflush(stdout); |
199 | 199 | ||
200 | argv[1] = bench->name; | 200 | argv[1] = bench->name; |
201 | run_bench(coll->name, bench->name, bench->fn, 1, argv, NULL); | 201 | run_bench(coll->name, bench->name, bench->fn, 1, argv); |
202 | printf("\n"); | 202 | printf("\n"); |
203 | } | 203 | } |
204 | } | 204 | } |
@@ -211,7 +211,7 @@ static void run_all_collections(void) | |||
211 | run_collection(coll); | 211 | run_collection(coll); |
212 | } | 212 | } |
213 | 213 | ||
214 | int cmd_bench(int argc, const char **argv, const char *prefix __maybe_unused) | 214 | int cmd_bench(int argc, const char **argv) |
215 | { | 215 | { |
216 | struct collection *coll; | 216 | struct collection *coll; |
217 | int ret = 0; | 217 | int ret = 0; |
@@ -270,7 +270,7 @@ int cmd_bench(int argc, const char **argv, const char *prefix __maybe_unused) | |||
270 | if (bench_format == BENCH_FORMAT_DEFAULT) | 270 | if (bench_format == BENCH_FORMAT_DEFAULT) |
271 | printf("# Running '%s/%s' benchmark:\n", coll->name, bench->name); | 271 | printf("# Running '%s/%s' benchmark:\n", coll->name, bench->name); |
272 | fflush(stdout); | 272 | fflush(stdout); |
273 | ret = run_bench(coll->name, bench->name, bench->fn, argc-1, argv+1, prefix); | 273 | ret = run_bench(coll->name, bench->name, bench->fn, argc-1, argv+1); |
274 | goto end; | 274 | goto end; |
275 | } | 275 | } |
276 | 276 | ||
diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c index 30e2b2cb2421..94b55eee0d9b 100644 --- a/tools/perf/builtin-buildid-cache.c +++ b/tools/perf/builtin-buildid-cache.c | |||
@@ -276,8 +276,7 @@ static int build_id_cache__update_file(const char *filename) | |||
276 | return err; | 276 | return err; |
277 | } | 277 | } |
278 | 278 | ||
279 | int cmd_buildid_cache(int argc, const char **argv, | 279 | int cmd_buildid_cache(int argc, const char **argv) |
280 | const char *prefix __maybe_unused) | ||
281 | { | 280 | { |
282 | struct strlist *list; | 281 | struct strlist *list; |
283 | struct str_node *pos; | 282 | struct str_node *pos; |
diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c index 5e914ee79eb3..26f4e608207f 100644 --- a/tools/perf/builtin-buildid-list.c +++ b/tools/perf/builtin-buildid-list.c | |||
@@ -87,8 +87,7 @@ out: | |||
87 | return 0; | 87 | return 0; |
88 | } | 88 | } |
89 | 89 | ||
90 | int cmd_buildid_list(int argc, const char **argv, | 90 | int cmd_buildid_list(int argc, const char **argv) |
91 | const char *prefix __maybe_unused) | ||
92 | { | 91 | { |
93 | bool show_kernel = false; | 92 | bool show_kernel = false; |
94 | bool with_hits = false; | 93 | bool with_hits = false; |
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 5cd6d7a047b9..70c2c773a2b8 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c | |||
@@ -2755,12 +2755,12 @@ static int perf_c2c__record(int argc, const char **argv) | |||
2755 | pr_debug("\n"); | 2755 | pr_debug("\n"); |
2756 | } | 2756 | } |
2757 | 2757 | ||
2758 | ret = cmd_record(i, rec_argv, NULL); | 2758 | ret = cmd_record(i, rec_argv); |
2759 | free(rec_argv); | 2759 | free(rec_argv); |
2760 | return ret; | 2760 | return ret; |
2761 | } | 2761 | } |
2762 | 2762 | ||
2763 | int cmd_c2c(int argc, const char **argv, const char *prefix __maybe_unused) | 2763 | int cmd_c2c(int argc, const char **argv) |
2764 | { | 2764 | { |
2765 | argc = parse_options(argc, argv, c2c_options, c2c_usage, | 2765 | argc = parse_options(argc, argv, c2c_options, c2c_usage, |
2766 | PARSE_OPT_STOP_AT_NON_OPTION); | 2766 | PARSE_OPT_STOP_AT_NON_OPTION); |
diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index 8c0d93b7c2f0..55f04f85b049 100644 --- a/tools/perf/builtin-config.c +++ b/tools/perf/builtin-config.c | |||
@@ -154,7 +154,7 @@ static int parse_config_arg(char *arg, char **var, char **value) | |||
154 | return 0; | 154 | return 0; |
155 | } | 155 | } |
156 | 156 | ||
157 | int cmd_config(int argc, const char **argv, const char *prefix __maybe_unused) | 157 | int cmd_config(int argc, const char **argv) |
158 | { | 158 | { |
159 | int i, ret = 0; | 159 | int i, ret = 0; |
160 | struct perf_config_set *set; | 160 | struct perf_config_set *set; |
diff --git a/tools/perf/builtin-data.c b/tools/perf/builtin-data.c index 7ad6e17ac6b3..0adb5f82335a 100644 --- a/tools/perf/builtin-data.c +++ b/tools/perf/builtin-data.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include "data-convert.h" | 6 | #include "data-convert.h" |
7 | #include "data-convert-bt.h" | 7 | #include "data-convert-bt.h" |
8 | 8 | ||
9 | typedef int (*data_cmd_fn_t)(int argc, const char **argv, const char *prefix); | 9 | typedef int (*data_cmd_fn_t)(int argc, const char **argv); |
10 | 10 | ||
11 | struct data_cmd { | 11 | struct data_cmd { |
12 | const char *name; | 12 | const char *name; |
@@ -50,8 +50,7 @@ static const char * const data_convert_usage[] = { | |||
50 | NULL | 50 | NULL |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static int cmd_data_convert(int argc, const char **argv, | 53 | static int cmd_data_convert(int argc, const char **argv) |
54 | const char *prefix __maybe_unused) | ||
55 | { | 54 | { |
56 | const char *to_ctf = NULL; | 55 | const char *to_ctf = NULL; |
57 | struct perf_data_convert_opts opts = { | 56 | struct perf_data_convert_opts opts = { |
@@ -98,7 +97,7 @@ static struct data_cmd data_cmds[] = { | |||
98 | { .name = NULL, }, | 97 | { .name = NULL, }, |
99 | }; | 98 | }; |
100 | 99 | ||
101 | int cmd_data(int argc, const char **argv, const char *prefix) | 100 | int cmd_data(int argc, const char **argv) |
102 | { | 101 | { |
103 | struct data_cmd *cmd; | 102 | struct data_cmd *cmd; |
104 | const char *cmdstr; | 103 | const char *cmdstr; |
@@ -118,7 +117,7 @@ int cmd_data(int argc, const char **argv, const char *prefix) | |||
118 | if (strcmp(cmd->name, cmdstr)) | 117 | if (strcmp(cmd->name, cmdstr)) |
119 | continue; | 118 | continue; |
120 | 119 | ||
121 | return cmd->fn(argc, argv, prefix); | 120 | return cmd->fn(argc, argv); |
122 | } | 121 | } |
123 | 122 | ||
124 | pr_err("Unknown command: %s\n", cmdstr); | 123 | pr_err("Unknown command: %s\n", cmdstr); |
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 5e4803158672..cd2605d86984 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c | |||
@@ -1321,7 +1321,7 @@ static int diff__config(const char *var, const char *value, | |||
1321 | return 0; | 1321 | return 0; |
1322 | } | 1322 | } |
1323 | 1323 | ||
1324 | int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused) | 1324 | int cmd_diff(int argc, const char **argv) |
1325 | { | 1325 | { |
1326 | int ret = hists__init(); | 1326 | int ret = hists__init(); |
1327 | 1327 | ||
diff --git a/tools/perf/builtin-evlist.c b/tools/perf/builtin-evlist.c index e09c4287fe87..6d210e40d611 100644 --- a/tools/perf/builtin-evlist.c +++ b/tools/perf/builtin-evlist.c | |||
@@ -46,7 +46,7 @@ static int __cmd_evlist(const char *file_name, struct perf_attr_details *details | |||
46 | return 0; | 46 | return 0; |
47 | } | 47 | } |
48 | 48 | ||
49 | int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused) | 49 | int cmd_evlist(int argc, const char **argv) |
50 | { | 50 | { |
51 | struct perf_attr_details details = { .verbose = false, }; | 51 | struct perf_attr_details details = { .verbose = false, }; |
52 | const struct option options[] = { | 52 | const struct option options[] = { |
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 6087295f8827..f80fb60b00b0 100644 --- a/tools/perf/builtin-ftrace.c +++ b/tools/perf/builtin-ftrace.c | |||
@@ -304,7 +304,7 @@ static int perf_ftrace_config(const char *var, const char *value, void *cb) | |||
304 | return -1; | 304 | return -1; |
305 | } | 305 | } |
306 | 306 | ||
307 | int cmd_ftrace(int argc, const char **argv, const char *prefix __maybe_unused) | 307 | int cmd_ftrace(int argc, const char **argv) |
308 | { | 308 | { |
309 | int ret; | 309 | int ret; |
310 | struct perf_ftrace ftrace = { | 310 | struct perf_ftrace ftrace = { |
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c index aed0d844e8c2..7ae238929e95 100644 --- a/tools/perf/builtin-help.c +++ b/tools/perf/builtin-help.c | |||
@@ -418,7 +418,7 @@ static int show_html_page(const char *perf_cmd) | |||
418 | return 0; | 418 | return 0; |
419 | } | 419 | } |
420 | 420 | ||
421 | int cmd_help(int argc, const char **argv, const char *prefix __maybe_unused) | 421 | int cmd_help(int argc, const char **argv) |
422 | { | 422 | { |
423 | bool show_all = false; | 423 | bool show_all = false; |
424 | enum help_format help_format = HELP_FORMAT_MAN; | 424 | enum help_format help_format = HELP_FORMAT_MAN; |
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index 8d1d13b9bab6..42dff0b1375a 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c | |||
@@ -738,7 +738,7 @@ static int __cmd_inject(struct perf_inject *inject) | |||
738 | return ret; | 738 | return ret; |
739 | } | 739 | } |
740 | 740 | ||
741 | int cmd_inject(int argc, const char **argv, const char *prefix __maybe_unused) | 741 | int cmd_inject(int argc, const char **argv) |
742 | { | 742 | { |
743 | struct perf_inject inject = { | 743 | struct perf_inject inject = { |
744 | .tool = { | 744 | .tool = { |
diff --git a/tools/perf/builtin-kallsyms.c b/tools/perf/builtin-kallsyms.c index 224bfc454b4a..8ff38c4eb2c0 100644 --- a/tools/perf/builtin-kallsyms.c +++ b/tools/perf/builtin-kallsyms.c | |||
@@ -43,7 +43,7 @@ static int __cmd_kallsyms(int argc, const char **argv) | |||
43 | return 0; | 43 | return 0; |
44 | } | 44 | } |
45 | 45 | ||
46 | int cmd_kallsyms(int argc, const char **argv, const char *prefix __maybe_unused) | 46 | int cmd_kallsyms(int argc, const char **argv) |
47 | { | 47 | { |
48 | const struct option options[] = { | 48 | const struct option options[] = { |
49 | OPT_INCR('v', "verbose", &verbose, "be more verbose (show counter open errors, etc)"), | 49 | OPT_INCR('v', "verbose", &verbose, "be more verbose (show counter open errors, etc)"), |
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index d509e74bc6e8..515587825af4 100644 --- a/tools/perf/builtin-kmem.c +++ b/tools/perf/builtin-kmem.c | |||
@@ -1866,7 +1866,7 @@ static int __cmd_record(int argc, const char **argv) | |||
1866 | for (j = 1; j < (unsigned int)argc; j++, i++) | 1866 | for (j = 1; j < (unsigned int)argc; j++, i++) |
1867 | rec_argv[i] = argv[j]; | 1867 | rec_argv[i] = argv[j]; |
1868 | 1868 | ||
1869 | return cmd_record(i, rec_argv, NULL); | 1869 | return cmd_record(i, rec_argv); |
1870 | } | 1870 | } |
1871 | 1871 | ||
1872 | static int kmem_config(const char *var, const char *value, void *cb __maybe_unused) | 1872 | static int kmem_config(const char *var, const char *value, void *cb __maybe_unused) |
@@ -1885,7 +1885,7 @@ static int kmem_config(const char *var, const char *value, void *cb __maybe_unus | |||
1885 | return 0; | 1885 | return 0; |
1886 | } | 1886 | } |
1887 | 1887 | ||
1888 | int cmd_kmem(int argc, const char **argv, const char *prefix __maybe_unused) | 1888 | int cmd_kmem(int argc, const char **argv) |
1889 | { | 1889 | { |
1890 | const char * const default_slab_sort = "frag,hit,bytes"; | 1890 | const char * const default_slab_sort = "frag,hit,bytes"; |
1891 | const char * const default_page_sort = "bytes,hit"; | 1891 | const char * const default_page_sort = "bytes,hit"; |
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 18e6c38864bc..38b409173693 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c | |||
@@ -1209,7 +1209,7 @@ kvm_events_record(struct perf_kvm_stat *kvm, int argc, const char **argv) | |||
1209 | set_option_flag(record_options, 0, "transaction", PARSE_OPT_DISABLED); | 1209 | set_option_flag(record_options, 0, "transaction", PARSE_OPT_DISABLED); |
1210 | 1210 | ||
1211 | record_usage = kvm_stat_record_usage; | 1211 | record_usage = kvm_stat_record_usage; |
1212 | return cmd_record(i, rec_argv, NULL); | 1212 | return cmd_record(i, rec_argv); |
1213 | } | 1213 | } |
1214 | 1214 | ||
1215 | static int | 1215 | static int |
@@ -1477,7 +1477,7 @@ static int kvm_cmd_stat(const char *file_name, int argc, const char **argv) | |||
1477 | #endif | 1477 | #endif |
1478 | 1478 | ||
1479 | perf_stat: | 1479 | perf_stat: |
1480 | return cmd_stat(argc, argv, NULL); | 1480 | return cmd_stat(argc, argv); |
1481 | } | 1481 | } |
1482 | #endif /* HAVE_KVM_STAT_SUPPORT */ | 1482 | #endif /* HAVE_KVM_STAT_SUPPORT */ |
1483 | 1483 | ||
@@ -1496,7 +1496,7 @@ static int __cmd_record(const char *file_name, int argc, const char **argv) | |||
1496 | 1496 | ||
1497 | BUG_ON(i != rec_argc); | 1497 | BUG_ON(i != rec_argc); |
1498 | 1498 | ||
1499 | return cmd_record(i, rec_argv, NULL); | 1499 | return cmd_record(i, rec_argv); |
1500 | } | 1500 | } |
1501 | 1501 | ||
1502 | static int __cmd_report(const char *file_name, int argc, const char **argv) | 1502 | static int __cmd_report(const char *file_name, int argc, const char **argv) |
@@ -1514,7 +1514,7 @@ static int __cmd_report(const char *file_name, int argc, const char **argv) | |||
1514 | 1514 | ||
1515 | BUG_ON(i != rec_argc); | 1515 | BUG_ON(i != rec_argc); |
1516 | 1516 | ||
1517 | return cmd_report(i, rec_argv, NULL); | 1517 | return cmd_report(i, rec_argv); |
1518 | } | 1518 | } |
1519 | 1519 | ||
1520 | static int | 1520 | static int |
@@ -1533,10 +1533,10 @@ __cmd_buildid_list(const char *file_name, int argc, const char **argv) | |||
1533 | 1533 | ||
1534 | BUG_ON(i != rec_argc); | 1534 | BUG_ON(i != rec_argc); |
1535 | 1535 | ||
1536 | return cmd_buildid_list(i, rec_argv, NULL); | 1536 | return cmd_buildid_list(i, rec_argv); |
1537 | } | 1537 | } |
1538 | 1538 | ||
1539 | int cmd_kvm(int argc, const char **argv, const char *prefix __maybe_unused) | 1539 | int cmd_kvm(int argc, const char **argv) |
1540 | { | 1540 | { |
1541 | const char *file_name = NULL; | 1541 | const char *file_name = NULL; |
1542 | const struct option kvm_options[] = { | 1542 | const struct option kvm_options[] = { |
@@ -1591,9 +1591,9 @@ int cmd_kvm(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1591 | else if (!strncmp(argv[0], "rep", 3)) | 1591 | else if (!strncmp(argv[0], "rep", 3)) |
1592 | return __cmd_report(file_name, argc, argv); | 1592 | return __cmd_report(file_name, argc, argv); |
1593 | else if (!strncmp(argv[0], "diff", 4)) | 1593 | else if (!strncmp(argv[0], "diff", 4)) |
1594 | return cmd_diff(argc, argv, NULL); | 1594 | return cmd_diff(argc, argv); |
1595 | else if (!strncmp(argv[0], "top", 3)) | 1595 | else if (!strncmp(argv[0], "top", 3)) |
1596 | return cmd_top(argc, argv, NULL); | 1596 | return cmd_top(argc, argv); |
1597 | else if (!strncmp(argv[0], "buildid-list", 12)) | 1597 | else if (!strncmp(argv[0], "buildid-list", 12)) |
1598 | return __cmd_buildid_list(file_name, argc, argv); | 1598 | return __cmd_buildid_list(file_name, argc, argv); |
1599 | #ifdef HAVE_KVM_STAT_SUPPORT | 1599 | #ifdef HAVE_KVM_STAT_SUPPORT |
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c index be9195e95c78..4bf2cb4d25aa 100644 --- a/tools/perf/builtin-list.c +++ b/tools/perf/builtin-list.c | |||
@@ -20,7 +20,7 @@ | |||
20 | static bool desc_flag = true; | 20 | static bool desc_flag = true; |
21 | static bool details_flag; | 21 | static bool details_flag; |
22 | 22 | ||
23 | int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused) | 23 | int cmd_list(int argc, const char **argv) |
24 | { | 24 | { |
25 | int i; | 25 | int i; |
26 | bool raw_dump = false; | 26 | bool raw_dump = false; |
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index e992e7206993..b686fb6759da 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c | |||
@@ -941,12 +941,12 @@ static int __cmd_record(int argc, const char **argv) | |||
941 | 941 | ||
942 | BUG_ON(i != rec_argc); | 942 | BUG_ON(i != rec_argc); |
943 | 943 | ||
944 | ret = cmd_record(i, rec_argv, NULL); | 944 | ret = cmd_record(i, rec_argv); |
945 | free(rec_argv); | 945 | free(rec_argv); |
946 | return ret; | 946 | return ret; |
947 | } | 947 | } |
948 | 948 | ||
949 | int cmd_lock(int argc, const char **argv, const char *prefix __maybe_unused) | 949 | int cmd_lock(int argc, const char **argv) |
950 | { | 950 | { |
951 | const struct option lock_options[] = { | 951 | const struct option lock_options[] = { |
952 | OPT_STRING('i', "input", &input_name, "file", "input file name"), | 952 | OPT_STRING('i', "input", &input_name, "file", "input file name"), |
@@ -1009,7 +1009,7 @@ int cmd_lock(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1009 | rc = __cmd_report(false); | 1009 | rc = __cmd_report(false); |
1010 | } else if (!strcmp(argv[0], "script")) { | 1010 | } else if (!strcmp(argv[0], "script")) { |
1011 | /* Aliased to 'perf script' */ | 1011 | /* Aliased to 'perf script' */ |
1012 | return cmd_script(argc, argv, prefix); | 1012 | return cmd_script(argc, argv); |
1013 | } else if (!strcmp(argv[0], "info")) { | 1013 | } else if (!strcmp(argv[0], "info")) { |
1014 | if (argc) { | 1014 | if (argc) { |
1015 | argc = parse_options(argc, argv, | 1015 | argc = parse_options(argc, argv, |
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c index 030a6cfdda59..643f4faac0d0 100644 --- a/tools/perf/builtin-mem.c +++ b/tools/perf/builtin-mem.c | |||
@@ -129,7 +129,7 @@ static int __cmd_record(int argc, const char **argv, struct perf_mem *mem) | |||
129 | pr_debug("\n"); | 129 | pr_debug("\n"); |
130 | } | 130 | } |
131 | 131 | ||
132 | ret = cmd_record(i, rec_argv, NULL); | 132 | ret = cmd_record(i, rec_argv); |
133 | free(rec_argv); | 133 | free(rec_argv); |
134 | return ret; | 134 | return ret; |
135 | } | 135 | } |
@@ -256,7 +256,7 @@ static int report_events(int argc, const char **argv, struct perf_mem *mem) | |||
256 | for (j = 1; j < argc; j++, i++) | 256 | for (j = 1; j < argc; j++, i++) |
257 | rep_argv[i] = argv[j]; | 257 | rep_argv[i] = argv[j]; |
258 | 258 | ||
259 | ret = cmd_report(i, rep_argv, NULL); | 259 | ret = cmd_report(i, rep_argv); |
260 | free(rep_argv); | 260 | free(rep_argv); |
261 | return ret; | 261 | return ret; |
262 | } | 262 | } |
@@ -330,7 +330,7 @@ error: | |||
330 | return ret; | 330 | return ret; |
331 | } | 331 | } |
332 | 332 | ||
333 | int cmd_mem(int argc, const char **argv, const char *prefix __maybe_unused) | 333 | int cmd_mem(int argc, const char **argv) |
334 | { | 334 | { |
335 | struct stat st; | 335 | struct stat st; |
336 | struct perf_mem mem = { | 336 | struct perf_mem mem = { |
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 51cdc230f6ca..d7360c2bda13 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c | |||
@@ -468,7 +468,7 @@ out: | |||
468 | 468 | ||
469 | 469 | ||
470 | static int | 470 | static int |
471 | __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused) | 471 | __cmd_probe(int argc, const char **argv) |
472 | { | 472 | { |
473 | const char * const probe_usage[] = { | 473 | const char * const probe_usage[] = { |
474 | "perf probe [<options>] 'PROBEDEF' ['PROBEDEF' ...]", | 474 | "perf probe [<options>] 'PROBEDEF' ['PROBEDEF' ...]", |
@@ -687,13 +687,13 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused) | |||
687 | return 0; | 687 | return 0; |
688 | } | 688 | } |
689 | 689 | ||
690 | int cmd_probe(int argc, const char **argv, const char *prefix) | 690 | int cmd_probe(int argc, const char **argv) |
691 | { | 691 | { |
692 | int ret; | 692 | int ret; |
693 | 693 | ||
694 | ret = init_params(); | 694 | ret = init_params(); |
695 | if (!ret) { | 695 | if (!ret) { |
696 | ret = __cmd_probe(argc, argv, prefix); | 696 | ret = __cmd_probe(argc, argv); |
697 | cleanup_params(); | 697 | cleanup_params(); |
698 | } | 698 | } |
699 | 699 | ||
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 04faef79a548..3191ab063852 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -1667,7 +1667,7 @@ static struct option __record_options[] = { | |||
1667 | 1667 | ||
1668 | struct option *record_options = __record_options; | 1668 | struct option *record_options = __record_options; |
1669 | 1669 | ||
1670 | int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused) | 1670 | int cmd_record(int argc, const char **argv) |
1671 | { | 1671 | { |
1672 | int err; | 1672 | int err; |
1673 | struct record *rec = &record; | 1673 | struct record *rec = &record; |
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 5ab8117c3bfd..3c8885a1c452 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -681,7 +681,7 @@ const char report_callchain_help[] = "Display call graph (stack chain/backtrace) | |||
681 | CALLCHAIN_REPORT_HELP | 681 | CALLCHAIN_REPORT_HELP |
682 | "\n\t\t\t\tDefault: " CALLCHAIN_DEFAULT_OPT; | 682 | "\n\t\t\t\tDefault: " CALLCHAIN_DEFAULT_OPT; |
683 | 683 | ||
684 | int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused) | 684 | int cmd_report(int argc, const char **argv) |
685 | { | 685 | { |
686 | struct perf_session *session; | 686 | struct perf_session *session; |
687 | struct itrace_synth_opts itrace_synth_opts = { .set = 0, }; | 687 | struct itrace_synth_opts itrace_synth_opts = { .set = 0, }; |
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index b92c4d97192c..79833e226789 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -3272,10 +3272,10 @@ static int __cmd_record(int argc, const char **argv) | |||
3272 | 3272 | ||
3273 | BUG_ON(i != rec_argc); | 3273 | BUG_ON(i != rec_argc); |
3274 | 3274 | ||
3275 | return cmd_record(i, rec_argv, NULL); | 3275 | return cmd_record(i, rec_argv); |
3276 | } | 3276 | } |
3277 | 3277 | ||
3278 | int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused) | 3278 | int cmd_sched(int argc, const char **argv) |
3279 | { | 3279 | { |
3280 | const char default_sort_order[] = "avg, max, switch, runtime"; | 3280 | const char default_sort_order[] = "avg, max, switch, runtime"; |
3281 | struct perf_sched sched = { | 3281 | struct perf_sched sched = { |
@@ -3412,7 +3412,7 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused) | |||
3412 | * Aliased to 'perf script' for now: | 3412 | * Aliased to 'perf script' for now: |
3413 | */ | 3413 | */ |
3414 | if (!strcmp(argv[0], "script")) | 3414 | if (!strcmp(argv[0], "script")) |
3415 | return cmd_script(argc, argv, prefix); | 3415 | return cmd_script(argc, argv); |
3416 | 3416 | ||
3417 | if (!strncmp(argv[0], "rec", 3)) { | 3417 | if (!strncmp(argv[0], "rec", 3)) { |
3418 | return __cmd_record(argc, argv); | 3418 | return __cmd_record(argc, argv); |
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index c98e16689b57..46acc8ece41f 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
@@ -2359,7 +2359,7 @@ int process_cpu_map_event(struct perf_tool *tool __maybe_unused, | |||
2359 | return set_maps(script); | 2359 | return set_maps(script); |
2360 | } | 2360 | } |
2361 | 2361 | ||
2362 | int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) | 2362 | int cmd_script(int argc, const char **argv) |
2363 | { | 2363 | { |
2364 | bool show_full_info = false; | 2364 | bool show_full_info = false; |
2365 | bool header = false; | 2365 | bool header = false; |
@@ -2504,7 +2504,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) | |||
2504 | if (argc > 1 && !strncmp(argv[0], "rec", strlen("rec"))) { | 2504 | if (argc > 1 && !strncmp(argv[0], "rec", strlen("rec"))) { |
2505 | rec_script_path = get_script_path(argv[1], RECORD_SUFFIX); | 2505 | rec_script_path = get_script_path(argv[1], RECORD_SUFFIX); |
2506 | if (!rec_script_path) | 2506 | if (!rec_script_path) |
2507 | return cmd_record(argc, argv, NULL); | 2507 | return cmd_record(argc, argv); |
2508 | } | 2508 | } |
2509 | 2509 | ||
2510 | if (argc > 1 && !strncmp(argv[0], "rep", strlen("rep"))) { | 2510 | if (argc > 1 && !strncmp(argv[0], "rep", strlen("rep"))) { |
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 01b589e3c3a6..2158ea14da57 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
@@ -2478,7 +2478,7 @@ static void setup_system_wide(int forks) | |||
2478 | } | 2478 | } |
2479 | } | 2479 | } |
2480 | 2480 | ||
2481 | int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused) | 2481 | int cmd_stat(int argc, const char **argv) |
2482 | { | 2482 | { |
2483 | const char * const stat_usage[] = { | 2483 | const char * const stat_usage[] = { |
2484 | "perf stat [<options>] [<command>]", | 2484 | "perf stat [<options>] [<command>]", |
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index fbd7c6c695b8..fafdb44b8bcb 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c | |||
@@ -1773,7 +1773,7 @@ static int timechart__io_record(int argc, const char **argv) | |||
1773 | for (i = 0; i < (unsigned int)argc; i++) | 1773 | for (i = 0; i < (unsigned int)argc; i++) |
1774 | *p++ = argv[i]; | 1774 | *p++ = argv[i]; |
1775 | 1775 | ||
1776 | return cmd_record(rec_argc, rec_argv, NULL); | 1776 | return cmd_record(rec_argc, rec_argv); |
1777 | } | 1777 | } |
1778 | 1778 | ||
1779 | 1779 | ||
@@ -1864,7 +1864,7 @@ static int timechart__record(struct timechart *tchart, int argc, const char **ar | |||
1864 | for (j = 0; j < (unsigned int)argc; j++) | 1864 | for (j = 0; j < (unsigned int)argc; j++) |
1865 | *p++ = argv[j]; | 1865 | *p++ = argv[j]; |
1866 | 1866 | ||
1867 | return cmd_record(rec_argc, rec_argv, NULL); | 1867 | return cmd_record(rec_argc, rec_argv); |
1868 | } | 1868 | } |
1869 | 1869 | ||
1870 | static int | 1870 | static int |
@@ -1917,8 +1917,7 @@ parse_time(const struct option *opt, const char *arg, int __maybe_unused unset) | |||
1917 | return 0; | 1917 | return 0; |
1918 | } | 1918 | } |
1919 | 1919 | ||
1920 | int cmd_timechart(int argc, const char **argv, | 1920 | int cmd_timechart(int argc, const char **argv) |
1921 | const char *prefix __maybe_unused) | ||
1922 | { | 1921 | { |
1923 | struct timechart tchart = { | 1922 | struct timechart tchart = { |
1924 | .tool = { | 1923 | .tool = { |
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index ab9077915763..a0c97c70ec81 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -1075,7 +1075,7 @@ parse_percent_limit(const struct option *opt, const char *arg, | |||
1075 | const char top_callchain_help[] = CALLCHAIN_RECORD_HELP CALLCHAIN_REPORT_HELP | 1075 | const char top_callchain_help[] = CALLCHAIN_RECORD_HELP CALLCHAIN_REPORT_HELP |
1076 | "\n\t\t\t\tDefault: fp,graph,0.5,caller,function"; | 1076 | "\n\t\t\t\tDefault: fp,graph,0.5,caller,function"; |
1077 | 1077 | ||
1078 | int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) | 1078 | int cmd_top(int argc, const char **argv) |
1079 | { | 1079 | { |
1080 | char errbuf[BUFSIZ]; | 1080 | char errbuf[BUFSIZ]; |
1081 | struct perf_top top = { | 1081 | struct perf_top top = { |
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 60053d49539b..c88f9f215e6f 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -1993,7 +1993,7 @@ static int trace__record(struct trace *trace, int argc, const char **argv) | |||
1993 | for (i = 0; i < (unsigned int)argc; i++) | 1993 | for (i = 0; i < (unsigned int)argc; i++) |
1994 | rec_argv[j++] = argv[i]; | 1994 | rec_argv[j++] = argv[i]; |
1995 | 1995 | ||
1996 | return cmd_record(j, rec_argv, NULL); | 1996 | return cmd_record(j, rec_argv); |
1997 | } | 1997 | } |
1998 | 1998 | ||
1999 | static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp); | 1999 | static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp); |
@@ -2791,7 +2791,7 @@ out: | |||
2791 | return err; | 2791 | return err; |
2792 | } | 2792 | } |
2793 | 2793 | ||
2794 | int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused) | 2794 | int cmd_trace(int argc, const char **argv) |
2795 | { | 2795 | { |
2796 | const char *trace_usage[] = { | 2796 | const char *trace_usage[] = { |
2797 | "perf trace [<options>] [<command>]", | 2797 | "perf trace [<options>] [<command>]", |
diff --git a/tools/perf/builtin-version.c b/tools/perf/builtin-version.c index 9b10cda6b6dc..b9a095b1db99 100644 --- a/tools/perf/builtin-version.c +++ b/tools/perf/builtin-version.c | |||
@@ -2,8 +2,7 @@ | |||
2 | #include "builtin.h" | 2 | #include "builtin.h" |
3 | #include "perf.h" | 3 | #include "perf.h" |
4 | 4 | ||
5 | int cmd_version(int argc __maybe_unused, const char **argv __maybe_unused, | 5 | int cmd_version(int argc __maybe_unused, const char **argv __maybe_unused) |
6 | const char *prefix __maybe_unused) | ||
7 | { | 6 | { |
8 | printf("perf version %s\n", perf_version_string); | 7 | printf("perf version %s\n", perf_version_string); |
9 | return 0; | 8 | return 0; |
diff --git a/tools/perf/builtin.h b/tools/perf/builtin.h index 036e1e35b1a8..26669bf9129c 100644 --- a/tools/perf/builtin.h +++ b/tools/perf/builtin.h | |||
@@ -13,35 +13,35 @@ void prune_packed_objects(int); | |||
13 | int read_line_with_nul(char *buf, int size, FILE *file); | 13 | int read_line_with_nul(char *buf, int size, FILE *file); |
14 | int check_pager_config(const char *cmd); | 14 | int check_pager_config(const char *cmd); |
15 | 15 | ||
16 | int cmd_annotate(int argc, const char **argv, const char *prefix); | 16 | int cmd_annotate(int argc, const char **argv); |
17 | int cmd_bench(int argc, const char **argv, const char *prefix); | 17 | int cmd_bench(int argc, const char **argv); |
18 | int cmd_buildid_cache(int argc, const char **argv, const char *prefix); | 18 | int cmd_buildid_cache(int argc, const char **argv); |
19 | int cmd_buildid_list(int argc, const char **argv, const char *prefix); | 19 | int cmd_buildid_list(int argc, const char **argv); |
20 | int cmd_config(int argc, const char **argv, const char *prefix); | 20 | int cmd_config(int argc, const char **argv); |
21 | int cmd_c2c(int argc, const char **argv, const char *prefix); | 21 | int cmd_c2c(int argc, const char **argv); |
22 | int cmd_diff(int argc, const char **argv, const char *prefix); | 22 | int cmd_diff(int argc, const char **argv); |
23 | int cmd_evlist(int argc, const char **argv, const char *prefix); | 23 | int cmd_evlist(int argc, const char **argv); |
24 | int cmd_help(int argc, const char **argv, const char *prefix); | 24 | int cmd_help(int argc, const char **argv); |
25 | int cmd_sched(int argc, const char **argv, const char *prefix); | 25 | int cmd_sched(int argc, const char **argv); |
26 | int cmd_kallsyms(int argc, const char **argv, const char *prefix); | 26 | int cmd_kallsyms(int argc, const char **argv); |
27 | int cmd_list(int argc, const char **argv, const char *prefix); | 27 | int cmd_list(int argc, const char **argv); |
28 | int cmd_record(int argc, const char **argv, const char *prefix); | 28 | int cmd_record(int argc, const char **argv); |
29 | int cmd_report(int argc, const char **argv, const char *prefix); | 29 | int cmd_report(int argc, const char **argv); |
30 | int cmd_stat(int argc, const char **argv, const char *prefix); | 30 | int cmd_stat(int argc, const char **argv); |
31 | int cmd_timechart(int argc, const char **argv, const char *prefix); | 31 | int cmd_timechart(int argc, const char **argv); |
32 | int cmd_top(int argc, const char **argv, const char *prefix); | 32 | int cmd_top(int argc, const char **argv); |
33 | int cmd_script(int argc, const char **argv, const char *prefix); | 33 | int cmd_script(int argc, const char **argv); |
34 | int cmd_version(int argc, const char **argv, const char *prefix); | 34 | int cmd_version(int argc, const char **argv); |
35 | int cmd_probe(int argc, const char **argv, const char *prefix); | 35 | int cmd_probe(int argc, const char **argv); |
36 | int cmd_kmem(int argc, const char **argv, const char *prefix); | 36 | int cmd_kmem(int argc, const char **argv); |
37 | int cmd_lock(int argc, const char **argv, const char *prefix); | 37 | int cmd_lock(int argc, const char **argv); |
38 | int cmd_kvm(int argc, const char **argv, const char *prefix); | 38 | int cmd_kvm(int argc, const char **argv); |
39 | int cmd_test(int argc, const char **argv, const char *prefix); | 39 | int cmd_test(int argc, const char **argv); |
40 | int cmd_trace(int argc, const char **argv, const char *prefix); | 40 | int cmd_trace(int argc, const char **argv); |
41 | int cmd_inject(int argc, const char **argv, const char *prefix); | 41 | int cmd_inject(int argc, const char **argv); |
42 | int cmd_mem(int argc, const char **argv, const char *prefix); | 42 | int cmd_mem(int argc, const char **argv); |
43 | int cmd_data(int argc, const char **argv, const char *prefix); | 43 | int cmd_data(int argc, const char **argv); |
44 | int cmd_ftrace(int argc, const char **argv, const char *prefix); | 44 | int cmd_ftrace(int argc, const char **argv); |
45 | 45 | ||
46 | int find_scripts(char **scripts_array, char **scripts_path_array); | 46 | int find_scripts(char **scripts_array, char **scripts_path_array); |
47 | #endif | 47 | #endif |
diff --git a/tools/perf/perf.c b/tools/perf/perf.c index 6d5479e03e0d..4b283d18e158 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c | |||
@@ -34,7 +34,7 @@ const char *input_name; | |||
34 | 34 | ||
35 | struct cmd_struct { | 35 | struct cmd_struct { |
36 | const char *cmd; | 36 | const char *cmd; |
37 | int (*fn)(int, const char **, const char *); | 37 | int (*fn)(int, const char **); |
38 | int option; | 38 | int option; |
39 | }; | 39 | }; |
40 | 40 | ||
@@ -339,13 +339,8 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv) | |||
339 | { | 339 | { |
340 | int status; | 340 | int status; |
341 | struct stat st; | 341 | struct stat st; |
342 | const char *prefix; | ||
343 | char sbuf[STRERR_BUFSIZE]; | 342 | char sbuf[STRERR_BUFSIZE]; |
344 | 343 | ||
345 | prefix = NULL; | ||
346 | if (p->option & RUN_SETUP) | ||
347 | prefix = NULL; /* setup_perf_directory(); */ | ||
348 | |||
349 | if (use_browser == -1) | 344 | if (use_browser == -1) |
350 | use_browser = check_browser_config(p->cmd); | 345 | use_browser = check_browser_config(p->cmd); |
351 | 346 | ||
@@ -356,7 +351,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv) | |||
356 | commit_pager_choice(); | 351 | commit_pager_choice(); |
357 | 352 | ||
358 | perf_env__set_cmdline(&perf_env, argc, argv); | 353 | perf_env__set_cmdline(&perf_env, argc, argv); |
359 | status = p->fn(argc, argv, prefix); | 354 | status = p->fn(argc, argv); |
360 | perf_config__exit(); | 355 | perf_config__exit(); |
361 | exit_browser(status); | 356 | exit_browser(status); |
362 | perf_env__exit(&perf_env); | 357 | perf_env__exit(&perf_env); |
@@ -566,7 +561,7 @@ int main(int argc, const char **argv) | |||
566 | #ifdef HAVE_LIBAUDIT_SUPPORT | 561 | #ifdef HAVE_LIBAUDIT_SUPPORT |
567 | setup_path(); | 562 | setup_path(); |
568 | argv[0] = "trace"; | 563 | argv[0] = "trace"; |
569 | return cmd_trace(argc, argv, NULL); | 564 | return cmd_trace(argc, argv); |
570 | #else | 565 | #else |
571 | fprintf(stderr, | 566 | fprintf(stderr, |
572 | "trace command not available: missing audit-libs devel package at build time.\n"); | 567 | "trace command not available: missing audit-libs devel package at build time.\n"); |
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 86822969e8a8..e6d7876c94c2 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c | |||
@@ -464,7 +464,7 @@ static int perf_test__list(int argc, const char **argv) | |||
464 | return 0; | 464 | return 0; |
465 | } | 465 | } |
466 | 466 | ||
467 | int cmd_test(int argc, const char **argv, const char *prefix __maybe_unused) | 467 | int cmd_test(int argc, const char **argv) |
468 | { | 468 | { |
469 | const char *test_usage[] = { | 469 | const char *test_usage[] = { |
470 | "perf test [<options>] [{list <test-name-fragment>|[<test-name-fragments>|<test-numbers>]}]", | 470 | "perf test [<options>] [{list <test-name-fragment>|[<test-name-fragments>|<test-numbers>]}]", |