From: Andi Kleen <a...@linux.intel.com> Expose INTX (count in transaction only, :t) and INTX_CHECKPOINTED (on transaction abort restore counter, :c) attributes as generic perf event attributes. These are important for measuring basic hardware transactional behaviour.
They also need to be handled in a special way in the Haswell port, so it's useful to have them as generic attributes. Typically they would be used as a group with: {cycles,cycles:t,cycles:ct} Then: Total cycles = cycles Percent cycles in transaction = (cycles:t/cycles)*100 Percent cycles in transaction lost due to aborts = ((cycles:t-cycles:ct) / cycles)*100 This gives a quick overview of the transactional execution. Used in followon patches. Signed-off-by: Andi Kleen <a...@linux.intel.com> --- include/linux/perf_event.h | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 33ed9d6..4c2adfa 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -251,11 +251,14 @@ struct perf_event_attr { precise_ip : 2, /* skid constraint */ mmap_data : 1, /* non-exec mmap data */ sample_id_all : 1, /* sample_type all events */ - exclude_host : 1, /* don't count in host */ exclude_guest : 1, /* don't count in guest */ + intx : 1, /* count inside transaction */ + intx_checkpointed : 1, /* checkpointed in transaction */ + + - __reserved_1 : 43; + __reserved_1 : 41; union { __u32 wakeup_events; /* wakeup every n events */ -- 1.7.7.6 -- 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/