aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 92a056f6d18d..64426b71381f 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -514,7 +514,7 @@ struct perf_guest_info_callbacks {
514#include <linux/ftrace.h> 514#include <linux/ftrace.h>
515#include <linux/cpu.h> 515#include <linux/cpu.h>
516#include <linux/irq_work.h> 516#include <linux/irq_work.h>
517#include <linux/jump_label.h> 517#include <linux/static_key.h>
518#include <linux/atomic.h> 518#include <linux/atomic.h>
519#include <asm/local.h> 519#include <asm/local.h>
520 520
@@ -1041,7 +1041,7 @@ static inline int is_software_event(struct perf_event *event)
1041 return event->pmu->task_ctx_nr == perf_sw_context; 1041 return event->pmu->task_ctx_nr == perf_sw_context;
1042} 1042}
1043 1043
1044extern struct jump_label_key perf_swevent_enabled[PERF_COUNT_SW_MAX]; 1044extern struct static_key perf_swevent_enabled[PERF_COUNT_SW_MAX];
1045 1045
1046extern void __perf_sw_event(u32, u64, struct pt_regs *, u64); 1046extern void __perf_sw_event(u32, u64, struct pt_regs *, u64);
1047 1047
@@ -1069,7 +1069,7 @@ perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr)
1069{ 1069{
1070 struct pt_regs hot_regs; 1070 struct pt_regs hot_regs;
1071 1071
1072 if (static_branch(&perf_swevent_enabled[event_id])) { 1072 if (static_key_false(&perf_swevent_enabled[event_id])) {
1073 if (!regs) { 1073 if (!regs) {
1074 perf_fetch_caller_regs(&hot_regs); 1074 perf_fetch_caller_regs(&hot_regs);
1075 regs = &hot_regs; 1075 regs = &hot_regs;
@@ -1078,12 +1078,12 @@ perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr)
1078 } 1078 }
1079} 1079}
1080 1080
1081extern struct jump_label_key_deferred perf_sched_events; 1081extern struct static_key_deferred perf_sched_events;
1082 1082
1083static inline void perf_event_task_sched_in(struct task_struct *prev, 1083static inline void perf_event_task_sched_in(struct task_struct *prev,
1084 struct task_struct *task) 1084 struct task_struct *task)
1085{ 1085{
1086 if (static_branch(&perf_sched_events.key)) 1086 if (static_key_false(&perf_sched_events.key))
1087 __perf_event_task_sched_in(prev, task); 1087 __perf_event_task_sched_in(prev, task);
1088} 1088}
1089 1089
@@ -1092,7 +1092,7 @@ static inline void perf_event_task_sched_out(struct task_struct *prev,
1092{ 1092{
1093 perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, NULL, 0); 1093 perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, NULL, 0);
1094 1094
1095 if (static_branch(&perf_sched_events.key)) 1095 if (static_key_false(&perf_sched_events.key))
1096 __perf_event_task_sched_out(prev, next); 1096 __perf_event_task_sched_out(prev, next);
1097} 1097}
1098 1098