[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <70665b8c27c81bb930e2facec738acdf42643765.1329851692.git.jbaron@redhat.com>
Date: Tue, 21 Feb 2012 15:03:08 -0500
From: Jason Baron <jbaron@...hat.com>
To: a.p.zijlstra@...llo.nl, mingo@...e.hu
Cc: rostedt@...dmis.org, mathieu.desnoyers@...icios.com, hpa@...or.com,
davem@...emloft.net, ddaney.cavm@...il.com,
akpm@...ux-foundation.org, paulus@...ba.org,
acme@...stprotocols.net, linux-kernel@...r.kernel.org
Subject: [PATCH 05/10] perf: update to use 'very_unlikely()'
Update perf functions with api change: static_branch() -> very_unlikely().
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Signed-off-by: Jason Baron <jbaron@...hat.com>
---
include/linux/perf_event.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 412b790..041d02b 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -1066,7 +1066,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 (very_unlikely(&perf_swevent_enabled[event_id])) {
if (!regs) {
perf_fetch_caller_regs(&hot_regs);
regs = &hot_regs;
@@ -1080,7 +1080,7 @@ extern struct jump_label_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 (very_unlikely(&perf_sched_events.key))
__perf_event_task_sched_in(prev, task);
}
@@ -1089,7 +1089,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 (very_unlikely(&perf_sched_events.key))
__perf_event_task_sched_out(prev, next);
}
--
1.7.7.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists