diff options
| author | Jiri Olsa <[email protected]> | 2015-10-16 10:41:25 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2015-10-19 21:05:59 +0000 |
| commit | d2b5a315ae84d235f00761468885c466f81d7805 (patch) | |
| tree | 4a0508f483e8752f67910a6c6b0a7ca60b86317a /tools/perf/builtin-script.c | |
| parent | perf cpu_map: Add data arg to cpu_map__build_map callback (diff) | |
| download | kernel-d2b5a315ae84d235f00761468885c466f81d7805.tar.gz kernel-d2b5a315ae84d235f00761468885c466f81d7805.zip | |
perf script: Check output fields only for samples
There's no need to check sampling output fields for events without
perf_event_attr::sample_type field set.
Signed-off-by: Jiri Olsa <[email protected]>
Tested-by: Kan Liang <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-script.c')
| -rw-r--r-- | tools/perf/builtin-script.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 8ce1c6bbfa45..2653c0273b89 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -686,7 +686,10 @@ static int process_attr(struct perf_tool *tool, union perf_event *event, set_print_ip_opts(&evsel->attr); - return perf_evsel__check_attr(evsel, scr->session); + if (evsel->attr.sample_type) + err = perf_evsel__check_attr(evsel, scr->session); + + return err; } static int process_comm_event(struct perf_tool *tool, |
