diff options
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index b1f89122bf6a..08855613ceb3 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -54,6 +54,7 @@ enum perf_hw_id { | |||
54 | PERF_COUNT_HW_BUS_CYCLES = 6, | 54 | PERF_COUNT_HW_BUS_CYCLES = 6, |
55 | PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7, | 55 | PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7, |
56 | PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8, | 56 | PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8, |
57 | PERF_COUNT_HW_REF_CPU_CYCLES = 9, | ||
57 | 58 | ||
58 | PERF_COUNT_HW_MAX, /* non-ABI */ | 59 | PERF_COUNT_HW_MAX, /* non-ABI */ |
59 | }; | 60 | }; |
@@ -890,6 +891,7 @@ struct perf_event_context { | |||
890 | int nr_active; | 891 | int nr_active; |
891 | int is_active; | 892 | int is_active; |
892 | int nr_stat; | 893 | int nr_stat; |
894 | int nr_freq; | ||
893 | int rotate_disable; | 895 | int rotate_disable; |
894 | atomic_t refcount; | 896 | atomic_t refcount; |
895 | struct task_struct *task; | 897 | struct task_struct *task; |
@@ -1063,12 +1065,12 @@ perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr) | |||
1063 | } | 1065 | } |
1064 | } | 1066 | } |
1065 | 1067 | ||
1066 | extern struct jump_label_key perf_sched_events; | 1068 | extern struct jump_label_key_deferred perf_sched_events; |
1067 | 1069 | ||
1068 | static inline void perf_event_task_sched_in(struct task_struct *prev, | 1070 | static inline void perf_event_task_sched_in(struct task_struct *prev, |
1069 | struct task_struct *task) | 1071 | struct task_struct *task) |
1070 | { | 1072 | { |
1071 | if (static_branch(&perf_sched_events)) | 1073 | if (static_branch(&perf_sched_events.key)) |
1072 | __perf_event_task_sched_in(prev, task); | 1074 | __perf_event_task_sched_in(prev, task); |
1073 | } | 1075 | } |
1074 | 1076 | ||
@@ -1077,7 +1079,7 @@ static inline void perf_event_task_sched_out(struct task_struct *prev, | |||
1077 | { | 1079 | { |
1078 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, NULL, 0); | 1080 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, NULL, 0); |
1079 | 1081 | ||
1080 | if (static_branch(&perf_sched_events)) | 1082 | if (static_branch(&perf_sched_events.key)) |
1081 | __perf_event_task_sched_out(prev, next); | 1083 | __perf_event_task_sched_out(prev, next); |
1082 | } | 1084 | } |
1083 | 1085 | ||