diff options
Diffstat (limited to 'tools/perf')
| -rw-r--r-- | tools/perf/builtin-record.c | 4 | ||||
| -rw-r--r-- | tools/perf/builtin-stat.c | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index f6426b496f4..6b0519f885e 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
| @@ -45,7 +45,7 @@ static int freq = 1000; | |||
| 45 | static int output; | 45 | static int output; |
| 46 | static int pipe_output = 0; | 46 | static int pipe_output = 0; |
| 47 | static const char *output_name = NULL; | 47 | static const char *output_name = NULL; |
| 48 | static int group = 0; | 48 | static bool group = false; |
| 49 | static int realtime_prio = 0; | 49 | static int realtime_prio = 0; |
| 50 | static bool nodelay = false; | 50 | static bool nodelay = false; |
| 51 | static bool raw_samples = false; | 51 | static bool raw_samples = false; |
| @@ -753,6 +753,8 @@ const struct option record_options[] = { | |||
| 753 | "child tasks do not inherit counters"), | 753 | "child tasks do not inherit counters"), |
| 754 | OPT_UINTEGER('F', "freq", &user_freq, "profile at this frequency"), | 754 | OPT_UINTEGER('F', "freq", &user_freq, "profile at this frequency"), |
| 755 | OPT_UINTEGER('m', "mmap-pages", &mmap_pages, "number of mmap data pages"), | 755 | OPT_UINTEGER('m', "mmap-pages", &mmap_pages, "number of mmap data pages"), |
| 756 | OPT_BOOLEAN(0, "group", &group, | ||
| 757 | "put the counters into a counter group"), | ||
| 756 | OPT_BOOLEAN('g', "call-graph", &call_graph, | 758 | OPT_BOOLEAN('g', "call-graph", &call_graph, |
| 757 | "do call-graph (stack chain/backtrace) recording"), | 759 | "do call-graph (stack chain/backtrace) recording"), |
| 758 | OPT_INCR('v', "verbose", &verbose, | 760 | OPT_INCR('v', "verbose", &verbose, |
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 1ad04ce29c3..5deb17d9e79 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
| @@ -193,6 +193,7 @@ static int big_num_opt = -1; | |||
| 193 | static const char *cpu_list; | 193 | static const char *cpu_list; |
| 194 | static const char *csv_sep = NULL; | 194 | static const char *csv_sep = NULL; |
| 195 | static bool csv_output = false; | 195 | static bool csv_output = false; |
| 196 | static bool group = false; | ||
| 196 | 197 | ||
| 197 | static volatile int done = 0; | 198 | static volatile int done = 0; |
| 198 | 199 | ||
| @@ -280,14 +281,14 @@ static int create_perf_stat_counter(struct perf_evsel *evsel) | |||
| 280 | attr->inherit = !no_inherit; | 281 | attr->inherit = !no_inherit; |
| 281 | 282 | ||
| 282 | if (system_wide) | 283 | if (system_wide) |
| 283 | return perf_evsel__open_per_cpu(evsel, evsel_list->cpus, false); | 284 | return perf_evsel__open_per_cpu(evsel, evsel_list->cpus, group); |
| 284 | 285 | ||
| 285 | if (target_pid == -1 && target_tid == -1) { | 286 | if (target_pid == -1 && target_tid == -1) { |
| 286 | attr->disabled = 1; | 287 | attr->disabled = 1; |
| 287 | attr->enable_on_exec = 1; | 288 | attr->enable_on_exec = 1; |
| 288 | } | 289 | } |
| 289 | 290 | ||
| 290 | return perf_evsel__open_per_thread(evsel, evsel_list->threads, false); | 291 | return perf_evsel__open_per_thread(evsel, evsel_list->threads, group); |
| 291 | } | 292 | } |
| 292 | 293 | ||
| 293 | /* | 294 | /* |
| @@ -1043,6 +1044,8 @@ static const struct option options[] = { | |||
| 1043 | "stat events on existing thread id"), | 1044 | "stat events on existing thread id"), |
| 1044 | OPT_BOOLEAN('a', "all-cpus", &system_wide, | 1045 | OPT_BOOLEAN('a', "all-cpus", &system_wide, |
| 1045 | "system-wide collection from all CPUs"), | 1046 | "system-wide collection from all CPUs"), |
| 1047 | OPT_BOOLEAN('g', "group", &group, | ||
| 1048 | "put the counters into a counter group"), | ||
| 1046 | OPT_BOOLEAN('c', "scale", &scale, | 1049 | OPT_BOOLEAN('c', "scale", &scale, |
| 1047 | "scale/normalize counters"), | 1050 | "scale/normalize counters"), |
| 1048 | OPT_INCR('v', "verbose", &verbose, | 1051 | OPT_INCR('v', "verbose", &verbose, |
