diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-record.c | 9 | ||||
-rw-r--r-- | tools/perf/perf.h | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index ffb627d40210..ba6777a147ca 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -48,7 +48,6 @@ struct perf_record_opts record_opts = { | |||
48 | static unsigned int page_size; | 48 | static unsigned int page_size; |
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; | ||
52 | static int realtime_prio = 0; | 51 | static int realtime_prio = 0; |
53 | static enum write_mode_t write_mode = WRITE_FORCE; | 52 | static enum write_mode_t write_mode = WRITE_FORCE; |
54 | static bool no_buildid = false; | 53 | static bool no_buildid = false; |
@@ -202,13 +201,13 @@ static void open_counters(struct perf_evlist *evlist) | |||
202 | */ | 201 | */ |
203 | bool time_needed = attr->sample_type & PERF_SAMPLE_TIME; | 202 | bool time_needed = attr->sample_type & PERF_SAMPLE_TIME; |
204 | 203 | ||
205 | if (group && pos != first) | 204 | if (record_opts.group && pos != first) |
206 | group_fd = first->fd; | 205 | group_fd = first->fd; |
207 | retry_sample_id: | 206 | retry_sample_id: |
208 | attr->sample_id_all = record_opts.sample_id_all_avail ? 1 : 0; | 207 | attr->sample_id_all = record_opts.sample_id_all_avail ? 1 : 0; |
209 | try_again: | 208 | try_again: |
210 | if (perf_evsel__open(pos, evlist->cpus, evlist->threads, group, | 209 | if (perf_evsel__open(pos, evlist->cpus, evlist->threads, |
211 | group_fd) < 0) { | 210 | record_opts.group, group_fd) < 0) { |
212 | int err = errno; | 211 | int err = errno; |
213 | 212 | ||
214 | if (err == EPERM || err == EACCES) { | 213 | if (err == EPERM || err == EACCES) { |
@@ -649,7 +648,7 @@ const struct option record_options[] = { | |||
649 | OPT_UINTEGER('F', "freq", &record_opts.user_freq, "profile at this frequency"), | 648 | OPT_UINTEGER('F', "freq", &record_opts.user_freq, "profile at this frequency"), |
650 | OPT_UINTEGER('m', "mmap-pages", &record_opts.mmap_pages, | 649 | OPT_UINTEGER('m', "mmap-pages", &record_opts.mmap_pages, |
651 | "number of mmap data pages"), | 650 | "number of mmap data pages"), |
652 | OPT_BOOLEAN(0, "group", &group, | 651 | OPT_BOOLEAN(0, "group", &record_opts.group, |
653 | "put the counters into a counter group"), | 652 | "put the counters into a counter group"), |
654 | OPT_BOOLEAN('g', "call-graph", &record_opts.call_graph, | 653 | OPT_BOOLEAN('g', "call-graph", &record_opts.call_graph, |
655 | "do call-graph (stack chain/backtrace) recording"), | 654 | "do call-graph (stack chain/backtrace) recording"), |
diff --git a/tools/perf/perf.h b/tools/perf/perf.h index 13c42f34e8b3..ea804f5a8cc2 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h | |||
@@ -189,6 +189,7 @@ struct perf_record_opts { | |||
189 | pid_t target_pid; | 189 | pid_t target_pid; |
190 | pid_t target_tid; | 190 | pid_t target_tid; |
191 | bool call_graph; | 191 | bool call_graph; |
192 | bool group; | ||
192 | bool inherit_stat; | 193 | bool inherit_stat; |
193 | bool no_delay; | 194 | bool no_delay; |
194 | bool no_inherit; | 195 | bool no_inherit; |