lkml.org 
[lkml]   [2013]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v0 54/71] perf script: Always allow fields 'addr' and 'cpu' for itrace
Date
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


\
 
 \ /
  Last update: 2013-12-11 20:21    [W:0.415 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site