History

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.

Andi Kleen committed 11 years ago

Commit 71ef3c61 parent b83ff1c1 file · +3 −1Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/perf_event.h+3−1
@@ -951,6 +951,7 @@ union perf_mem_data_src { · 950 unmodified lines
951 *951 *
952 * in_tx: running in a hardware transaction952 * in_tx: running in a hardware transaction
953 * abort: aborting a hardware transaction953 * abort: aborting a hardware transaction
954 * cycles: cycles from last branch (or 0 if not supported)
954 */955 */
955struct perf_branch_entry {956struct perf_branch_entry {
956 __u64 from;957 __u64 from;
@@ -959,7 +960,8 @@ struct perf_branch_entry { · 2 unmodified lines
959 predicted:1,/* target predicted */960 predicted:1,/* target predicted */
960 in_tx:1, /* in transaction */961 in_tx:1, /* in transaction */
961 abort:1, /* transaction abort */962 abort:1, /* transaction abort */
962 reserved:60;963 cycles:16, /* cycle count to last branch */
964 reserved:44;
963};965};
964 966
965#endif /* _UAPI_LINUX_PERF_EVENT_H */967#endif /* _UAPI_LINUX_PERF_EVENT_H */