From a6b58708f1037cf92f525af1ef4ed7c6b2a16831 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 11 Nov 2011 15:12:56 -0200 Subject: [PATCH] --- yaml --- r: 277285 b: refs/heads/master c: ed80f5813fd6ecc6d74250681910a4214f699d4e h: refs/heads/master i: 277283: 89b5b69818b8e5a3c741928f37600df80333006f v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-record.c | 9 ++++----- trunk/tools/perf/perf.h | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 5139e4c6910f..e8fe4e443150 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b424eba27160dd19577896d4520b8eebabed919f +refs/heads/master: ed80f5813fd6ecc6d74250681910a4214f699d4e diff --git a/trunk/tools/perf/builtin-record.c b/trunk/tools/perf/builtin-record.c index ffb627d40210..ba6777a147ca 100644 --- a/trunk/tools/perf/builtin-record.c +++ b/trunk/tools/perf/builtin-record.c @@ -48,7 +48,6 @@ struct perf_record_opts record_opts = { static unsigned int page_size; static int output; static const char *output_name = NULL; -static bool group = false; static int realtime_prio = 0; static enum write_mode_t write_mode = WRITE_FORCE; static bool no_buildid = false; @@ -202,13 +201,13 @@ static void open_counters(struct perf_evlist *evlist) */ bool time_needed = attr->sample_type & PERF_SAMPLE_TIME; - if (group && pos != first) + if (record_opts.group && pos != first) group_fd = first->fd; retry_sample_id: attr->sample_id_all = record_opts.sample_id_all_avail ? 1 : 0; try_again: - if (perf_evsel__open(pos, evlist->cpus, evlist->threads, group, - group_fd) < 0) { + if (perf_evsel__open(pos, evlist->cpus, evlist->threads, + record_opts.group, group_fd) < 0) { int err = errno; if (err == EPERM || err == EACCES) { @@ -649,7 +648,7 @@ const struct option record_options[] = { OPT_UINTEGER('F', "freq", &record_opts.user_freq, "profile at this frequency"), OPT_UINTEGER('m', "mmap-pages", &record_opts.mmap_pages, "number of mmap data pages"), - OPT_BOOLEAN(0, "group", &group, + OPT_BOOLEAN(0, "group", &record_opts.group, "put the counters into a counter group"), OPT_BOOLEAN('g', "call-graph", &record_opts.call_graph, "do call-graph (stack chain/backtrace) recording"), diff --git a/trunk/tools/perf/perf.h b/trunk/tools/perf/perf.h index 13c42f34e8b3..ea804f5a8cc2 100644 --- a/trunk/tools/perf/perf.h +++ b/trunk/tools/perf/perf.h @@ -189,6 +189,7 @@ struct perf_record_opts { pid_t target_pid; pid_t target_tid; bool call_graph; + bool group; bool inherit_stat; bool no_delay; bool no_inherit;