Merge branch 'perf/jump-labels' into perf/core
Merge reason: After much naming discussion, there seems to be consensus now - queue it up for v3.4. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -514,7 +514,7 @@ struct perf_guest_info_callbacks {
|
||||
#include <linux/ftrace.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/irq_work.h>
|
||||
#include <linux/jump_label.h>
|
||||
#include <linux/static_key.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/local.h>
|
||||
|
||||
@@ -1041,7 +1041,7 @@ static inline int is_software_event(struct perf_event *event)
|
||||
return event->pmu->task_ctx_nr == perf_sw_context;
|
||||
}
|
||||
|
||||
extern struct jump_label_key perf_swevent_enabled[PERF_COUNT_SW_MAX];
|
||||
extern struct static_key perf_swevent_enabled[PERF_COUNT_SW_MAX];
|
||||
|
||||
extern void __perf_sw_event(u32, u64, struct pt_regs *, u64);
|
||||
|
||||
@@ -1069,7 +1069,7 @@ perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr)
|
||||
{
|
||||
struct pt_regs hot_regs;
|
||||
|
||||
if (static_branch(&perf_swevent_enabled[event_id])) {
|
||||
if (static_key_false(&perf_swevent_enabled[event_id])) {
|
||||
if (!regs) {
|
||||
perf_fetch_caller_regs(&hot_regs);
|
||||
regs = &hot_regs;
|
||||
@@ -1078,12 +1078,12 @@ perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr)
|
||||
}
|
||||
}
|
||||
|
||||
extern struct jump_label_key_deferred perf_sched_events;
|
||||
extern struct static_key_deferred perf_sched_events;
|
||||
|
||||
static inline void perf_event_task_sched_in(struct task_struct *prev,
|
||||
struct task_struct *task)
|
||||
{
|
||||
if (static_branch(&perf_sched_events.key))
|
||||
if (static_key_false(&perf_sched_events.key))
|
||||
__perf_event_task_sched_in(prev, task);
|
||||
}
|
||||
|
||||
@@ -1092,7 +1092,7 @@ static inline void perf_event_task_sched_out(struct task_struct *prev,
|
||||
{
|
||||
perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, NULL, 0);
|
||||
|
||||
if (static_branch(&perf_sched_events.key))
|
||||
if (static_key_false(&perf_sched_events.key))
|
||||
__perf_event_task_sched_out(prev, next);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user