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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 6963d3c3
......@@ -25,17 +25,17 @@
# endif
#endif
int bench_numa(int argc, const char **argv, const char *prefix);
int bench_sched_messaging(int argc, const char **argv, const char *prefix);
int bench_sched_pipe(int argc, const char **argv, const char *prefix);
int bench_mem_memcpy(int argc, const char **argv, const char *prefix);
int bench_mem_memset(int argc, const char **argv, const char *prefix);
int bench_futex_hash(int argc, const char **argv, const char *prefix);
int bench_futex_wake(int argc, const char **argv, const char *prefix);
int bench_futex_wake_parallel(int argc, const char **argv, const char *prefix);
int bench_futex_requeue(int argc, const char **argv, const char *prefix);
int bench_numa(int argc, const char **argv);
int bench_sched_messaging(int argc, const char **argv);
int bench_sched_pipe(int argc, const char **argv);
int bench_mem_memcpy(int argc, const char **argv);
int bench_mem_memset(int argc, const char **argv);
int bench_futex_hash(int argc, const char **argv);
int bench_futex_wake(int argc, const char **argv);
int bench_futex_wake_parallel(int argc, const char **argv);
int bench_futex_requeue(int argc, const char **argv);
/* pi futexes */
int bench_futex_lock_pi(int argc, const char **argv, const char *prefix);
int bench_futex_lock_pi(int argc, const char **argv);
#define BENCH_FORMAT_DEFAULT_STR "default"
#define BENCH_FORMAT_DEFAULT 0
......
......@@ -114,8 +114,7 @@ static void print_summary(void)
(int) runtime.tv_sec);
}
int bench_futex_hash(int argc, const char **argv,
const char *prefix __maybe_unused)
int bench_futex_hash(int argc, const char **argv)
{
int ret = 0;
cpu_set_t cpu;
......
......@@ -140,8 +140,7 @@ static void create_threads(struct worker *w, pthread_attr_t thread_attr)
}
}
int bench_futex_lock_pi(int argc, const char **argv,
const char *prefix __maybe_unused)
int bench_futex_lock_pi(int argc, const char **argv)
{
int ret = 0;
unsigned int i;
......
......@@ -109,8 +109,7 @@ static void toggle_done(int sig __maybe_unused,
done = true;
}
int bench_futex_requeue(int argc, const char **argv,
const char *prefix __maybe_unused)
int bench_futex_requeue(int argc, const char **argv)
{
int ret = 0;
unsigned int i, j;
......
......@@ -197,8 +197,7 @@ static void toggle_done(int sig __maybe_unused,
done = true;
}
int bench_futex_wake_parallel(int argc, const char **argv,
const char *prefix __maybe_unused)
int bench_futex_wake_parallel(int argc, const char **argv)
{
int ret = 0;
unsigned int i, j;
......
......@@ -115,8 +115,7 @@ static void toggle_done(int sig __maybe_unused,
done = true;
}
int bench_futex_wake(int argc, const char **argv,
const char *prefix __maybe_unused)
int bench_futex_wake(int argc, const char **argv)
{
int ret = 0;
unsigned int i, j;
......
......@@ -284,7 +284,7 @@ static const char * const bench_mem_memcpy_usage[] = {
NULL
};
int bench_mem_memcpy(int argc, const char **argv, const char *prefix __maybe_unused)
int bench_mem_memcpy(int argc, const char **argv)
{
struct bench_mem_info info = {
.functions = memcpy_functions,
......@@ -358,7 +358,7 @@ static const struct function memset_functions[] = {
{ .name = NULL, }
};
int bench_mem_memset(int argc, const char **argv, const char *prefix __maybe_unused)
int bench_mem_memset(int argc, const char **argv)
{
struct bench_mem_info info = {
.functions = memset_functions,
......
......@@ -1767,7 +1767,7 @@ static int bench_all(void)
return 0;
}
int bench_numa(int argc, const char **argv, const char *prefix __maybe_unused)
int bench_numa(int argc, const char **argv)
{
init_params(&p0, "main,", argc, argv);
argc = parse_options(argc, argv, options, bench_numa_usage, 0);
......
......@@ -260,8 +260,7 @@ static const char * const bench_sched_message_usage[] = {
NULL
};
int bench_sched_messaging(int argc, const char **argv,
const char *prefix __maybe_unused)
int bench_sched_messaging(int argc, const char **argv)
{
unsigned int i, total_children;
struct timeval start, stop, diff;
......
......@@ -76,7 +76,7 @@ static void *worker_thread(void *__tdata)
return NULL;
}
int bench_sched_pipe(int argc, const char **argv, const char *prefix __maybe_unused)
int bench_sched_pipe(int argc, const char **argv)
{
struct thread_data threads[2], *td;
int pipe_1[2], pipe_2[2];
......
......@@ -383,7 +383,7 @@ static const char * const annotate_usage[] = {
NULL
};
int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_annotate(int argc, const char **argv)
{
struct perf_annotate annotate = {
.tool = {
......
......@@ -25,7 +25,7 @@
#include <string.h>
#include <sys/prctl.h>
typedef int (*bench_fn_t)(int argc, const char **argv, const char *prefix);
typedef int (*bench_fn_t)(int argc, const char **argv);
struct bench {
const char *name;
......@@ -155,7 +155,7 @@ static int bench_str2int(const char *str)
* to something meaningful:
*/
static int run_bench(const char *coll_name, const char *bench_name, bench_fn_t fn,
int argc, const char **argv, const char *prefix)
int argc, const char **argv)
{
int size;
char *name;
......@@ -171,7 +171,7 @@ static int run_bench(const char *coll_name, const char *bench_name, bench_fn_t f
prctl(PR_SET_NAME, name);
argv[0] = name;
ret = fn(argc, argv, prefix);
ret = fn(argc, argv);
free(name);
......@@ -198,7 +198,7 @@ static void run_collection(struct collection *coll)
fflush(stdout);
argv[1] = bench->name;
run_bench(coll->name, bench->name, bench->fn, 1, argv, NULL);
run_bench(coll->name, bench->name, bench->fn, 1, argv);
printf("\n");
}
}
......@@ -211,7 +211,7 @@ static void run_all_collections(void)
run_collection(coll);
}
int cmd_bench(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_bench(int argc, const char **argv)
{
struct collection *coll;
int ret = 0;
......@@ -270,7 +270,7 @@ int cmd_bench(int argc, const char **argv, const char *prefix __maybe_unused)
if (bench_format == BENCH_FORMAT_DEFAULT)
printf("# Running '%s/%s' benchmark:\n", coll->name, bench->name);
fflush(stdout);
ret = run_bench(coll->name, bench->name, bench->fn, argc-1, argv+1, prefix);
ret = run_bench(coll->name, bench->name, bench->fn, argc-1, argv+1);
goto end;
}
......
......@@ -276,8 +276,7 @@ static int build_id_cache__update_file(const char *filename)
return err;
}
int cmd_buildid_cache(int argc, const char **argv,
const char *prefix __maybe_unused)
int cmd_buildid_cache(int argc, const char **argv)
{
struct strlist *list;
struct str_node *pos;
......
......@@ -87,8 +87,7 @@ static int perf_session__list_build_ids(bool force, bool with_hits)
return 0;
}
int cmd_buildid_list(int argc, const char **argv,
const char *prefix __maybe_unused)
int cmd_buildid_list(int argc, const char **argv)
{
bool show_kernel = false;
bool with_hits = false;
......
......@@ -2755,12 +2755,12 @@ static int perf_c2c__record(int argc, const char **argv)
pr_debug("\n");
}
ret = cmd_record(i, rec_argv, NULL);
ret = cmd_record(i, rec_argv);
free(rec_argv);
return ret;
}
int cmd_c2c(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_c2c(int argc, const char **argv)
{
argc = parse_options(argc, argv, c2c_options, c2c_usage,
PARSE_OPT_STOP_AT_NON_OPTION);
......
......@@ -154,7 +154,7 @@ static int parse_config_arg(char *arg, char **var, char **value)
return 0;
}
int cmd_config(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_config(int argc, const char **argv)
{
int i, ret = 0;
struct perf_config_set *set;
......
......@@ -6,7 +6,7 @@
#include "data-convert.h"
#include "data-convert-bt.h"
typedef int (*data_cmd_fn_t)(int argc, const char **argv, const char *prefix);
typedef int (*data_cmd_fn_t)(int argc, const char **argv);
struct data_cmd {
const char *name;
......@@ -50,8 +50,7 @@ static const char * const data_convert_usage[] = {
NULL
};
static int cmd_data_convert(int argc, const char **argv,
const char *prefix __maybe_unused)
static int cmd_data_convert(int argc, const char **argv)
{
const char *to_ctf = NULL;
struct perf_data_convert_opts opts = {
......@@ -98,7 +97,7 @@ static struct data_cmd data_cmds[] = {
{ .name = NULL, },
};
int cmd_data(int argc, const char **argv, const char *prefix)
int cmd_data(int argc, const char **argv)
{
struct data_cmd *cmd;
const char *cmdstr;
......@@ -118,7 +117,7 @@ int cmd_data(int argc, const char **argv, const char *prefix)
if (strcmp(cmd->name, cmdstr))
continue;
return cmd->fn(argc, argv, prefix);
return cmd->fn(argc, argv);
}
pr_err("Unknown command: %s\n", cmdstr);
......
......@@ -1321,7 +1321,7 @@ static int diff__config(const char *var, const char *value,
return 0;
}
int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_diff(int argc, const char **argv)
{
int ret = hists__init();
......
......@@ -46,7 +46,7 @@ static int __cmd_evlist(const char *file_name, struct perf_attr_details *details
return 0;
}
int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_evlist(int argc, const char **argv)
{
struct perf_attr_details details = { .verbose = false, };
const struct option options[] = {
......
......@@ -304,7 +304,7 @@ static int perf_ftrace_config(const char *var, const char *value, void *cb)
return -1;
}
int cmd_ftrace(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_ftrace(int argc, const char **argv)
{
int ret;
struct perf_ftrace ftrace = {
......
......@@ -418,7 +418,7 @@ static int show_html_page(const char *perf_cmd)
return 0;
}
int cmd_help(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_help(int argc, const char **argv)
{
bool show_all = false;
enum help_format help_format = HELP_FORMAT_MAN;
......
......@@ -738,7 +738,7 @@ static int __cmd_inject(struct perf_inject *inject)
return ret;
}
int cmd_inject(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_inject(int argc, const char **argv)
{
struct perf_inject inject = {
.tool = {
......
......@@ -43,7 +43,7 @@ static int __cmd_kallsyms(int argc, const char **argv)
return 0;
}
int cmd_kallsyms(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_kallsyms(int argc, const char **argv)
{
const struct option options[] = {
OPT_INCR('v', "verbose", &verbose, "be more verbose (show counter open errors, etc)"),
......
......@@ -1866,7 +1866,7 @@ static int __cmd_record(int argc, const char **argv)
for (j = 1; j < (unsigned int)argc; j++, i++)
rec_argv[i] = argv[j];
return cmd_record(i, rec_argv, NULL);
return cmd_record(i, rec_argv);
}
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
return 0;
}
int cmd_kmem(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_kmem(int argc, const char **argv)
{
const char * const default_slab_sort = "frag,hit,bytes";
const char * const default_page_sort = "bytes,hit";
......
......@@ -1209,7 +1209,7 @@ kvm_events_record(struct perf_kvm_stat *kvm, int argc, const char **argv)
set_option_flag(record_options, 0, "transaction", PARSE_OPT_DISABLED);
record_usage = kvm_stat_record_usage;
return cmd_record(i, rec_argv, NULL);
return cmd_record(i, rec_argv);
}
static int
......@@ -1477,7 +1477,7 @@ static int kvm_cmd_stat(const char *file_name, int argc, const char **argv)
#endif
perf_stat:
return cmd_stat(argc, argv, NULL);
return cmd_stat(argc, argv);
}
#endif /* HAVE_KVM_STAT_SUPPORT */
......@@ -1496,7 +1496,7 @@ static int __cmd_record(const char *file_name, int argc, const char **argv)
BUG_ON(i != rec_argc);
return cmd_record(i, rec_argv, NULL);
return cmd_record(i, rec_argv);
}
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)
BUG_ON(i != rec_argc);
return cmd_report(i, rec_argv, NULL);
return cmd_report(i, rec_argv);
}
static int
......@@ -1533,10 +1533,10 @@ __cmd_buildid_list(const char *file_name, int argc, const char **argv)
BUG_ON(i != rec_argc);
return cmd_buildid_list(i, rec_argv, NULL);
return cmd_buildid_list(i, rec_argv);
}
int cmd_kvm(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_kvm(int argc, const char **argv)
{
const char *file_name = NULL;
const struct option kvm_options[] = {
......@@ -1591,9 +1591,9 @@ int cmd_kvm(int argc, const char **argv, const char *prefix __maybe_unused)
else if (!strncmp(argv[0], "rep", 3))
return __cmd_report(file_name, argc, argv);
else if (!strncmp(argv[0], "diff", 4))
return cmd_diff(argc, argv, NULL);
return cmd_diff(argc, argv);
else if (!strncmp(argv[0], "top", 3))
return cmd_top(argc, argv, NULL);
return cmd_top(argc, argv);
else if (!strncmp(argv[0], "buildid-list", 12))
return __cmd_buildid_list(file_name, argc, argv);
#ifdef HAVE_KVM_STAT_SUPPORT
......
......@@ -20,7 +20,7 @@
static bool desc_flag = true;
static bool details_flag;
int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_list(int argc, const char **argv)
{
int i;
bool raw_dump = false;
......
......@@ -941,12 +941,12 @@ static int __cmd_record(int argc, const char **argv)
BUG_ON(i != rec_argc);
ret = cmd_record(i, rec_argv, NULL);
ret = cmd_record(i, rec_argv);
free(rec_argv);
return ret;
}
int cmd_lock(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_lock(int argc, const char **argv)
{
const struct option lock_options[] = {
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)
rc = __cmd_report(false);
} else if (!strcmp(argv[0], "script")) {
/* Aliased to 'perf script' */
return cmd_script(argc, argv, prefix);
return cmd_script(argc, argv);
} else if (!strcmp(argv[0], "info")) {
if (argc) {
argc = parse_options(argc, argv,
......
......@@ -129,7 +129,7 @@ static int __cmd_record(int argc, const char **argv, struct perf_mem *mem)
pr_debug("\n");
}
ret = cmd_record(i, rec_argv, NULL);
ret = cmd_record(i, rec_argv);
free(rec_argv);
return ret;
}
......@@ -256,7 +256,7 @@ static int report_events(int argc, const char **argv, struct perf_mem *mem)
for (j = 1; j < argc; j++, i++)
rep_argv[i] = argv[j];
ret = cmd_report(i, rep_argv, NULL);
ret = cmd_report(i, rep_argv);
free(rep_argv);
return ret;
}
......@@ -330,7 +330,7 @@ parse_mem_ops(const struct option *opt, const char *str, int unset)
return ret;
}
int cmd_mem(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_mem(int argc, const char **argv)
{
struct stat st;
struct perf_mem mem = {
......
......@@ -468,7 +468,7 @@ static int perf_del_probe_events(struct strfilter *filter)
static int
__cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
__cmd_probe(int argc, const char **argv)
{
const char * const probe_usage[] = {
"perf probe [<options>] 'PROBEDEF' ['PROBEDEF' ...]",
......@@ -687,13 +687,13 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
return 0;
}
int cmd_probe(int argc, const char **argv, const char *prefix)
int cmd_probe(int argc, const char **argv)
{
int ret;
ret = init_params();
if (!ret) {
ret = __cmd_probe(argc, argv, prefix);
ret = __cmd_probe(argc, argv);
cleanup_params();
}
......
......@@ -1667,7 +1667,7 @@ static struct option __record_options[] = {
struct option *record_options = __record_options;
int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_record(int argc, const char **argv)
{
int err;
struct record *rec = &record;
......
......@@ -681,7 +681,7 @@ const char report_callchain_help[] = "Display call graph (stack chain/backtrace)
CALLCHAIN_REPORT_HELP
"\n\t\t\t\tDefault: " CALLCHAIN_DEFAULT_OPT;
int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_report(int argc, const char **argv)
{
struct perf_session *session;
struct itrace_synth_opts itrace_synth_opts = { .set = 0, };
......
......@@ -3272,10 +3272,10 @@ static int __cmd_record(int argc, const char **argv)
BUG_ON(i != rec_argc);
return cmd_record(i, rec_argv, NULL);
return cmd_record(i, rec_argv);
}
int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_sched(int argc, const char **argv)
{
const char default_sort_order[] = "avg, max, switch, runtime";
struct perf_sched sched = {
......@@ -3412,7 +3412,7 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
* Aliased to 'perf script' for now:
*/
if (!strcmp(argv[0], "script"))
return cmd_script(argc, argv, prefix);
return cmd_script(argc, argv);
if (!strncmp(argv[0], "rec", 3)) {
return __cmd_record(argc, argv);
......
......@@ -2359,7 +2359,7 @@ int process_cpu_map_event(struct perf_tool *tool __maybe_unused,
return set_maps(script);
}
int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_script(int argc, const char **argv)
{
bool show_full_info = false;
bool header = false;
......@@ -2504,7 +2504,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
if (argc > 1 && !strncmp(argv[0], "rec", strlen("rec"))) {
rec_script_path = get_script_path(argv[1], RECORD_SUFFIX);
if (!rec_script_path)
return cmd_record(argc, argv, NULL);
return cmd_record(argc, argv);
}
if (argc > 1 && !strncmp(argv[0], "rep", strlen("rep"))) {
......
......@@ -2478,7 +2478,7 @@ static void setup_system_wide(int forks)
}
}
int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_stat(int argc, const char **argv)
{
const char * const stat_usage[] = {
"perf stat [<options>] [<command>]",
......
......@@ -1773,7 +1773,7 @@ static int timechart__io_record(int argc, const char **argv)
for (i = 0; i < (unsigned int)argc; i++)
*p++ = argv[i];
return cmd_record(rec_argc, rec_argv, NULL);
return cmd_record(rec_argc, rec_argv);
}
......@@ -1864,7 +1864,7 @@ static int timechart__record(struct timechart *tchart, int argc, const char **ar
for (j = 0; j < (unsigned int)argc; j++)
*p++ = argv[j];
return cmd_record(rec_argc, rec_argv, NULL);
return cmd_record(rec_argc, rec_argv);
}
static int
......@@ -1917,8 +1917,7 @@ parse_time(const struct option *opt, const char *arg, int __maybe_unused unset)
return 0;
}
int cmd_timechart(int argc, const char **argv,
const char *prefix __maybe_unused)
int cmd_timechart(int argc, const char **argv)
{
struct timechart tchart = {
.tool = {
......
......@@ -1075,7 +1075,7 @@ parse_percent_limit(const struct option *opt, const char *arg,
const char top_callchain_help[] = CALLCHAIN_RECORD_HELP CALLCHAIN_REPORT_HELP
"\n\t\t\t\tDefault: fp,graph,0.5,caller,function";
int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_top(int argc, const char **argv)
{
char errbuf[BUFSIZ];
struct perf_top top = {
......
......@@ -1993,7 +1993,7 @@ static int trace__record(struct trace *trace, int argc, const char **argv)
for (i = 0; i < (unsigned int)argc; i++)
rec_argv[j++] = argv[i];
return cmd_record(j, rec_argv, NULL);
return cmd_record(j, rec_argv);
}
static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp);
......@@ -2791,7 +2791,7 @@ static int trace__parse_events_option(const struct option *opt, const char *str,
return err;
}
int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_trace(int argc, const char **argv)
{
const char *trace_usage[] = {
"perf trace [<options>] [<command>]",
......
......@@ -2,8 +2,7 @@
#include "builtin.h"
#include "perf.h"
int cmd_version(int argc __maybe_unused, const char **argv __maybe_unused,
const char *prefix __maybe_unused)
int cmd_version(int argc __maybe_unused, const char **argv __maybe_unused)
{
printf("perf version %s\n", perf_version_string);
return 0;
......
......@@ -13,35 +13,35 @@ void prune_packed_objects(int);
int read_line_with_nul(char *buf, int size, FILE *file);
int check_pager_config(const char *cmd);
int cmd_annotate(int argc, const char **argv, const char *prefix);
int cmd_bench(int argc, const char **argv, const char *prefix);
int cmd_buildid_cache(int argc, const char **argv, const char *prefix);
int cmd_buildid_list(int argc, const char **argv, const char *prefix);
int cmd_config(int argc, const char **argv, const char *prefix);
int cmd_c2c(int argc, const char **argv, const char *prefix);
int cmd_diff(int argc, const char **argv, const char *prefix);
int cmd_evlist(int argc, const char **argv, const char *prefix);
int cmd_help(int argc, const char **argv, const char *prefix);
int cmd_sched(int argc, const char **argv, const char *prefix);
int cmd_kallsyms(int argc, const char **argv, const char *prefix);
int cmd_list(int argc, const char **argv, const char *prefix);
int cmd_record(int argc, const char **argv, const char *prefix);
int cmd_report(int argc, const char **argv, const char *prefix);
int cmd_stat(int argc, const char **argv, const char *prefix);
int cmd_timechart(int argc, const char **argv, const char *prefix);
int cmd_top(int argc, const char **argv, const char *prefix);
int cmd_script(int argc, const char **argv, const char *prefix);
int cmd_version(int argc, const char **argv, const char *prefix);
int cmd_probe(int argc, const char **argv, const char *prefix);
int cmd_kmem(int argc, const char **argv, const char *prefix);
int cmd_lock(int argc, const char **argv, const char *prefix);
int cmd_kvm(int argc, const char **argv, const char *prefix);
int cmd_test(int argc, const char **argv, const char *prefix);
int cmd_trace(int argc, const char **argv, const char *prefix);
int cmd_inject(int argc, const char **argv, const char *prefix);
int cmd_mem(int argc, const char **argv, const char *prefix);
int cmd_data(int argc, const char **argv, const char *prefix);
int cmd_ftrace(int argc, const char **argv, const char *prefix);
int cmd_annotate(int argc, const char **argv);
int cmd_bench(int argc, const char **argv);
int cmd_buildid_cache(int argc, const char **argv);
int cmd_buildid_list(int argc, const char **argv);
int cmd_config(int argc, const char **argv);
int cmd_c2c(int argc, const char **argv);
int cmd_diff(int argc, const char **argv);
int cmd_evlist(int argc, const char **argv);
int cmd_help(int argc, const char **argv);
int cmd_sched(int argc, const char **argv);
int cmd_kallsyms(int argc, const char **argv);
int cmd_list(int argc, const char **argv);
int cmd_record(int argc, const char **argv);
int cmd_report(int argc, const char **argv);
int cmd_stat(int argc, const char **argv);
int cmd_timechart(int argc, const char **argv);
int cmd_top(int argc, const char **argv);
int cmd_script(int argc, const char **argv);
int cmd_version(int argc, const char **argv);
int cmd_probe(int argc, const char **argv);
int cmd_kmem(int argc, const char **argv);
int cmd_lock(int argc, const char **argv);
int cmd_kvm(int argc, const char **argv);
int cmd_test(int argc, const char **argv);
int cmd_trace(int argc, const char **argv);
int cmd_inject(int argc, const char **argv);
int cmd_mem(int argc, const char **argv);
int cmd_data(int argc, const char **argv);
int cmd_ftrace(int argc, const char **argv);
int find_scripts(char **scripts_array, char **scripts_path_array);
#endif
......@@ -34,7 +34,7 @@ const char *input_name;
struct cmd_struct {
const char *cmd;
int (*fn)(int, const char **, const char *);
int (*fn)(int, const char **);
int option;
};
......@@ -339,13 +339,8 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
{
int status;
struct stat st;
const char *prefix;
char sbuf[STRERR_BUFSIZE];
prefix = NULL;
if (p->option & RUN_SETUP)
prefix = NULL; /* setup_perf_directory(); */
if (use_browser == -1)
use_browser = check_browser_config(p->cmd);
......@@ -356,7 +351,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
commit_pager_choice();
perf_env__set_cmdline(&perf_env, argc, argv);
status = p->fn(argc, argv, prefix);
status = p->fn(argc, argv);
perf_config__exit();
exit_browser(status);
perf_env__exit(&perf_env);
......@@ -566,7 +561,7 @@ int main(int argc, const char **argv)
#ifdef HAVE_LIBAUDIT_SUPPORT
setup_path();
argv[0] = "trace";
return cmd_trace(argc, argv, NULL);
return cmd_trace(argc, argv);
#else
fprintf(stderr,
"trace command not available: missing audit-libs devel package at build time.\n");
......
......@@ -464,7 +464,7 @@ static int perf_test__list(int argc, const char **argv)
return 0;
}
int cmd_test(int argc, const char **argv, const char *prefix __maybe_unused)
int cmd_test(int argc, const char **argv)
{
const char *test_usage[] = {
"perf test [<options>] [{list <test-name-fragment>|[<test-name-fragments>|<test-numbers>]}]",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment