aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 2583a9b04317..5091a27e6d28 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -680,11 +680,12 @@ static int perf_record_config(const char *var, const char *value, void *cb)
680 return perf_default_config(var, value, cb); 680 return perf_default_config(var, value, cb);
681} 681}
682 682
683static const char * const record_usage[] = { 683static const char * const __record_usage[] = {
684 "perf record [<options>] [<command>]", 684 "perf record [<options>] [<command>]",
685 "perf record [<options>] -- <command> [<options>]", 685 "perf record [<options>] -- <command> [<options>]",
686 NULL 686 NULL
687}; 687};
688const char * const *record_usage = __record_usage;
688 689
689/* 690/*
690 * XXX Ideally would be local to cmd_record() and passed to a record__new 691 * XXX Ideally would be local to cmd_record() and passed to a record__new
@@ -725,7 +726,7 @@ const char record_callchain_help[] = CALLCHAIN_HELP "fp";
725 * perf_evlist__prepare_workload, etc instead of fork+exec'in 'perf record', 726 * perf_evlist__prepare_workload, etc instead of fork+exec'in 'perf record',
726 * using pipes, etc. 727 * using pipes, etc.
727 */ 728 */
728const struct option record_options[] = { 729struct option __record_options[] = {
729 OPT_CALLBACK('e', "event", &record.evlist, "event", 730 OPT_CALLBACK('e', "event", &record.evlist, "event",
730 "event selector. use 'perf list' to list available events", 731 "event selector. use 'perf list' to list available events",
731 parse_events_option), 732 parse_events_option),
@@ -802,6 +803,8 @@ const struct option record_options[] = {
802 OPT_END() 803 OPT_END()
803}; 804};
804 805
806struct option *record_options = __record_options;
807
805int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused) 808int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
806{ 809{
807 int err = -ENOMEM; 810 int err = -ENOMEM;