From: Adrian Hunter <adrian.hun...@intel.com>

Add new Instruction Tracing members of struct perf_event_attr
to debug prints and byte swapping.

Signed-off-by: Adrian Hunter <adrian.hun...@intel.com>
---
 tools/perf/util/evsel.c   | 4 ++++
 tools/perf/util/session.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 4e92a22..da2116c 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -981,6 +981,10 @@ static size_t perf_event_attr__fprintf(struct 
perf_event_attr *attr, FILE *fp)
        ret += PRINT_ATTR_X64(branch_sample_type);
        ret += PRINT_ATTR_X64(sample_regs_user);
        ret += PRINT_ATTR_U32(sample_stack_user);
+       ret += PRINT_ATTR_X64(itrace_config);
+       ret += PRINT_ATTR_U32(itrace_watermark);
+       ret += PRINT_ATTR_U32(itrace_sample_type);
+       ret += PRINT_ATTR_U64(itrace_sample_size);
 
        ret += fprintf(fp, "%.60s\n", graph_dotted_line);
 
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index f2ac351..7847096 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -407,6 +407,10 @@ void perf_event__attr_swap(struct perf_event_attr *attr)
        attr->branch_sample_type = bswap_64(attr->branch_sample_type);
        attr->sample_regs_user   = bswap_64(attr->sample_regs_user);
        attr->sample_stack_user  = bswap_32(attr->sample_stack_user);
+       attr->itrace_config      = bswap_64(attr->itrace_config);
+       attr->itrace_watermark   = bswap_32(attr->itrace_watermark);
+       attr->itrace_sample_type = bswap_32(attr->itrace_sample_type);
+       attr->itrace_sample_size = bswap_64(attr->itrace_sample_size);
 
        swap_bitfield((u8 *) (&attr->read_format + 1), sizeof(u64));
 }
-- 
1.8.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to