diff options
author | Jiri Olsa <jolsa@kernel.org> | 2015-11-05 15:40:47 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-12-17 15:15:17 -0300 |
commit | 3ba78bd00e508bf46a6aa2b8e296dc8287ea4c29 (patch) | |
tree | d7fb49a89d65dd40b7497bdff22808822877ac4e /tools/perf/util | |
parent | 4979d0c7d0c73a3e799d4dcfbacd3cd11cc55638 (diff) | |
download | op-kernel-dev-3ba78bd00e508bf46a6aa2b8e296dc8287ea4c29.zip op-kernel-dev-3ba78bd00e508bf46a6aa2b8e296dc8287ea4c29.tar.gz |
perf stat record: Initialize record features
Disabling all non stat related features.
Also as we now enable STAT feature in the data file, adding code to
instruct session open to skip sample type checking for stat data files.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Kan Liang <kan.liang@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1446734469-11352-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/session.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index a90c74b..d5636ba 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -37,6 +37,9 @@ static int perf_session__open(struct perf_session *session) if (perf_data_file__is_pipe(file)) return 0; + if (perf_header__has_feat(&session->header, HEADER_STAT)) + return 0; + if (!perf_evlist__valid_sample_type(session->evlist)) { pr_err("non matching sample_type\n"); return -1; |