diff options
Diffstat (limited to 'tools/perf/builtin-record.c')
| -rw-r--r-- | tools/perf/builtin-record.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 749862d57a83..ffb627d40210 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
| @@ -35,9 +35,10 @@ enum write_mode_t { | |||
| 35 | WRITE_APPEND | 35 | WRITE_APPEND |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | static struct perf_record_opts record_opts = { | 38 | struct perf_record_opts record_opts = { |
| 39 | .target_pid = -1, | 39 | .target_pid = -1, |
| 40 | .target_tid = -1, | 40 | .target_tid = -1, |
| 41 | .mmap_pages = UINT_MAX, | ||
| 41 | .user_freq = UINT_MAX, | 42 | .user_freq = UINT_MAX, |
| 42 | .user_interval = ULLONG_MAX, | 43 | .user_interval = ULLONG_MAX, |
| 43 | .freq = 1000, | 44 | .freq = 1000, |
| @@ -45,7 +46,6 @@ static struct perf_record_opts record_opts = { | |||
| 45 | }; | 46 | }; |
| 46 | 47 | ||
| 47 | static unsigned int page_size; | 48 | static unsigned int page_size; |
| 48 | static unsigned int mmap_pages = UINT_MAX; | ||
| 49 | static int output; | 49 | static int output; |
| 50 | static const char *output_name = NULL; | 50 | static const char *output_name = NULL; |
| 51 | static bool group = false; | 51 | static bool group = false; |
| @@ -272,7 +272,7 @@ try_again: | |||
| 272 | exit(-1); | 272 | exit(-1); |
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | if (perf_evlist__mmap(evlist, mmap_pages, false) < 0) | 275 | if (perf_evlist__mmap(evlist, record_opts.mmap_pages, false) < 0) |
| 276 | die("failed to mmap with %d (%s)\n", errno, strerror(errno)); | 276 | die("failed to mmap with %d (%s)\n", errno, strerror(errno)); |
| 277 | 277 | ||
| 278 | if (file_new) | 278 | if (file_new) |
| @@ -647,7 +647,8 @@ const struct option record_options[] = { | |||
| 647 | OPT_BOOLEAN('i', "no-inherit", &record_opts.no_inherit, | 647 | OPT_BOOLEAN('i', "no-inherit", &record_opts.no_inherit, |
| 648 | "child tasks do not inherit counters"), | 648 | "child tasks do not inherit counters"), |
| 649 | OPT_UINTEGER('F', "freq", &record_opts.user_freq, "profile at this frequency"), | 649 | OPT_UINTEGER('F', "freq", &record_opts.user_freq, "profile at this frequency"), |
| 650 | OPT_UINTEGER('m', "mmap-pages", &mmap_pages, "number of mmap data pages"), | 650 | OPT_UINTEGER('m', "mmap-pages", &record_opts.mmap_pages, |
| 651 | "number of mmap data pages"), | ||
| 651 | OPT_BOOLEAN(0, "group", &group, | 652 | OPT_BOOLEAN(0, "group", &group, |
| 652 | "put the counters into a counter group"), | 653 | "put the counters into a counter group"), |
| 653 | OPT_BOOLEAN('g', "call-graph", &record_opts.call_graph, | 654 | OPT_BOOLEAN('g', "call-graph", &record_opts.call_graph, |
