| From | Alexander Shishkin <> | Subject | [PATCH v0 54/71] perf script: Always allow fields 'addr' and 'cpu' for itrace | Date | Wed, 11 Dec 2013 14:37:06 +0200 |
| |
From: Adrian Hunter <adrian.hunter@intel.com>
If a file contains Instruction Tracing data then always allow fields 'addr' and 'cpu' to be selected as options for perf script. This is necessary because Instruction Trace decoding may synthesize events with that information.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> --- tools/perf/builtin-script.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 96cdcd8..15f4941 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -190,6 +190,7 @@ static int perf_evsel__check_attr(struct perf_evsel *evsel, } if (PRINT_FIELD(ADDR) && + !perf_header__has_feat(&session->header, HEADER_ITRACE) && perf_evsel__check_stype(evsel, PERF_SAMPLE_ADDR, "ADDR", PERF_OUTPUT_ADDR)) return -EINVAL; @@ -223,6 +224,7 @@ static int perf_evsel__check_attr(struct perf_evsel *evsel, return -EINVAL; if (PRINT_FIELD(CPU) && + !perf_header__has_feat(&session->header, HEADER_ITRACE) && perf_evsel__check_stype(evsel, PERF_SAMPLE_CPU, "CPU", PERF_OUTPUT_CPU)) return -EINVAL; -- 1.8.5.1
|