From ebf31f502492527e2b6b5e5cf85a4ebc7fc8a52e Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Sun, 17 Oct 2010 12:15:00 +0200 Subject: jump_label: Add COND_STMT(), reducer wrappery The use of the JUMP_LABEL() construct ends up creating endless silly wrappers, create a higher level construct to reduce this clutter. Signed-off-by: Peter Zijlstra Cc: Jason Baron Cc: Steven Rostedt Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker Cc: Paul Mackerras LKML-Reference: Signed-off-by: Ingo Molnar --- include/linux/perf_event.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'include/linux/perf_event.h') diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 3b80cbf..057bf22 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -903,21 +903,13 @@ extern atomic_t perf_task_events; static inline void perf_event_task_sched_in(struct task_struct *task) { - JUMP_LABEL(&perf_task_events, have_events); - return; - -have_events: - __perf_event_task_sched_in(task); + COND_STMT(&perf_task_events, __perf_event_task_sched_in(task)); } static inline void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next) { - JUMP_LABEL(&perf_task_events, have_events); - return; - -have_events: - __perf_event_task_sched_out(task, next); + COND_STMT(&perf_task_events, __perf_event_task_sched_out(task, next)); } extern int perf_event_init_task(struct task_struct *child); -- cgit v1.1