Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932785AbbHDI5v (ORCPT ); Tue, 4 Aug 2015 04:57:51 -0400 Received: from terminus.zytor.com ([198.137.202.10]:50168 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932378AbbHDI5r (ORCPT ); Tue, 4 Aug 2015 04:57:47 -0400 Date: Tue, 4 Aug 2015 01:57:16 -0700 From: tip-bot for Andi Kleen Message-ID: Cc: mingo@kernel.org, peterz@infradead.org, torvalds@linux-foundation.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, ak@linux.intel.com, hpa@zytor.com Reply-To: torvalds@linux-foundation.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, ak@linux.intel.com, hpa@zytor.com, peterz@infradead.org, mingo@kernel.org In-Reply-To: <1431285767-27027-5-git-send-email-andi@firstfloor.org> References: <1431285767-27027-5-git-send-email-andi@firstfloor.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf: Add cycles to branch_info Git-Commit-ID: 71ef3c6b9d4665ee7afbbe4c208a98917dcfc32f X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2223 Lines: 60 Commit-ID: 71ef3c6b9d4665ee7afbbe4c208a98917dcfc32f Gitweb: http://git.kernel.org/tip/71ef3c6b9d4665ee7afbbe4c208a98917dcfc32f Author: Andi Kleen AuthorDate: Sun, 10 May 2015 12:22:42 -0700 Committer: Ingo Molnar CommitDate: Tue, 4 Aug 2015 10:16:57 +0200 perf: Add cycles to branch_info Intel Skylake supports reporting the time in cycles a branch in the LBR took, to give a rough indication of the basic block performance. Export the cycle information in the branch_info structure. This can be done by just reusing some currently zero padding. This is just the generic header change. The architecture still needs to fill it in. There's no attempt to convert to real time, as we really want cycles here. Signed-off-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: eranian@google.com Link: http://lkml.kernel.org/r/1431285767-27027-5-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar --- include/uapi/linux/perf_event.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 022d0ac..2881145 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h @@ -951,6 +951,7 @@ union perf_mem_data_src { * * in_tx: running in a hardware transaction * abort: aborting a hardware transaction + * cycles: cycles from last branch (or 0 if not supported) */ struct perf_branch_entry { __u64 from; @@ -959,7 +960,8 @@ struct perf_branch_entry { predicted:1,/* target predicted */ in_tx:1, /* in transaction */ abort:1, /* transaction abort */ - reserved:60; + cycles:16, /* cycle count to last branch */ + reserved:44; }; #endif /* _UAPI_LINUX_PERF_EVENT_H */ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/