aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/include/uapi/linux/perf_event.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h
index b1c0b187acfe..642db5fa3286 100644
--- a/tools/include/uapi/linux/perf_event.h
+++ b/tools/include/uapi/linux/perf_event.h
@@ -174,6 +174,8 @@ enum perf_branch_sample_type_shift {
174 PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT = 14, /* no flags */ 174 PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT = 14, /* no flags */
175 PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT = 15, /* no cycles */ 175 PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT = 15, /* no cycles */
176 176
177 PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT = 16, /* save branch type */
178
177 PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */ 179 PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */
178}; 180};
179 181
@@ -198,9 +200,30 @@ enum perf_branch_sample_type {
198 PERF_SAMPLE_BRANCH_NO_FLAGS = 1U << PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT, 200 PERF_SAMPLE_BRANCH_NO_FLAGS = 1U << PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT,
199 PERF_SAMPLE_BRANCH_NO_CYCLES = 1U << PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT, 201 PERF_SAMPLE_BRANCH_NO_CYCLES = 1U << PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT,
200 202
203 PERF_SAMPLE_BRANCH_TYPE_SAVE =
204 1U << PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT,
205
201 PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, 206 PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT,
202}; 207};
203 208
209/*
210 * Common flow change classification
211 */
212enum {
213 PERF_BR_UNKNOWN = 0, /* unknown */
214 PERF_BR_COND = 1, /* conditional */
215 PERF_BR_UNCOND = 2, /* unconditional */
216 PERF_BR_IND = 3, /* indirect */
217 PERF_BR_CALL = 4, /* function call */
218 PERF_BR_IND_CALL = 5, /* indirect function call */
219 PERF_BR_RET = 6, /* function return */
220 PERF_BR_SYSCALL = 7, /* syscall */
221 PERF_BR_SYSRET = 8, /* syscall return */
222 PERF_BR_COND_CALL = 9, /* conditional function call */
223 PERF_BR_COND_RET = 10, /* conditional function return */
224 PERF_BR_MAX,
225};
226
204#define PERF_SAMPLE_BRANCH_PLM_ALL \ 227#define PERF_SAMPLE_BRANCH_PLM_ALL \
205 (PERF_SAMPLE_BRANCH_USER|\ 228 (PERF_SAMPLE_BRANCH_USER|\
206 PERF_SAMPLE_BRANCH_KERNEL|\ 229 PERF_SAMPLE_BRANCH_KERNEL|\
@@ -1015,6 +1038,7 @@ union perf_mem_data_src {
1015 * in_tx: running in a hardware transaction 1038 * in_tx: running in a hardware transaction
1016 * abort: aborting a hardware transaction 1039 * abort: aborting a hardware transaction
1017 * cycles: cycles from last branch (or 0 if not supported) 1040 * cycles: cycles from last branch (or 0 if not supported)
1041 * type: branch type
1018 */ 1042 */
1019struct perf_branch_entry { 1043struct perf_branch_entry {
1020 __u64 from; 1044 __u64 from;
@@ -1024,7 +1048,8 @@ struct perf_branch_entry {
1024 in_tx:1, /* in transaction */ 1048 in_tx:1, /* in transaction */
1025 abort:1, /* transaction abort */ 1049 abort:1, /* transaction abort */
1026 cycles:16, /* cycle count to last branch */ 1050 cycles:16, /* cycle count to last branch */
1027 reserved:44; 1051 type:4, /* branch type */
1052 reserved:40;
1028}; 1053};
1029 1054
1030#endif /* _UAPI_LINUX_PERF_EVENT_H */ 1055#endif /* _UAPI_LINUX_PERF_EVENT_H */