aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2015-02-24 15:13:40 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-02-25 12:42:23 -0300
commit85c273d2b6569706762cf400079ca0699e007d81 (patch)
treeff85ad53d0f7ea05d8bea1aa685d7df33ad1f6ac /tools/perf/util/evsel.c
parentperf tools: Print the thread's tid on PERF_RECORD_COMM events when -D is asked (diff)
downloadlinux-dev-85c273d2b6569706762cf400079ca0699e007d81.tar.xz
linux-dev-85c273d2b6569706762cf400079ca0699e007d81.zip
perf record: Support recording running/enabled time
Add an option to perf record to record running/enabled time for read events, similar to what stat does. This is useful to understand multiplexing problems. Right now the report support is not great, but at least report -D already supports it. Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/1424819620-16043-1-git-send-email-andi@firstfloor.org [ Fixed the Documentation entry to match the OPT_BOOLEAN one ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r--tools/perf/util/evsel.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index f93e5208c762..bb4eff28869e 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -734,6 +734,12 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts)
if (opts->sample_transaction)
perf_evsel__set_sample_bit(evsel, TRANSACTION);
+ if (opts->running_time) {
+ evsel->attr.read_format |=
+ PERF_FORMAT_TOTAL_TIME_ENABLED |
+ PERF_FORMAT_TOTAL_TIME_RUNNING;
+ }
+
/*
* XXX see the function comment above
*